Genesis Insoft The name you can TRUST
twitterlogo facebooklogo
Home  |  Contact Us |  Careers
Visual C++ Question Bank / FAQs

This is a mock Exam for the VC++ programmers. It is created by Genesis InSoft Limited (admin@genesisinsoft.com) and may be freely distributed so long as it is unmodified. Please email us if you have any corrections or comments.

Question 1

The base class of CPaintDC class is

  1. CClientDC
  2. CWindowDC
  3. CDC
  4. CObject

Answer to Question 1

Question 2

A CPaintDC object can only be used when responding to which of the following message?

  1. WM_SIZE
  2. WM_CREATE
  3. WM_COMMAND
  4. WM_PAINT

Answer to Question 2

Question 3

Which function retrieves the device context (DC) for the entire window, including title bar, menus, and scroll bars.

  1. GetDC
  2. BeginPaint
  3. GetWindowDC
  4. All of the above

Answer to Question 3

Question 4

RegisterClass function takes a pointer to the following structure?

  1. MSG
  2. WNDCLASS
  3. PAINTSTRUCT
  4. WNDCLASSEX

Answer to Question 4

Question 5

Which class performs a CWnd::BeginPaint at construction time and CWnd::EndPaint at destruction time.

  1. CPaintDC
  2. CClientDC
  3. CDC
  4. CMetaFileDC

Answer to Question 5

Question 6

Which data members are defined in CWinApp class?

  1. m_nCmdShow, m_hInstance
  2. m_pszAppName
  3. m_pActiveWnd, m_pszExeName
  4. All of the above

Answer to Question 6

Question 7

Which member function can we override in an application to provide a customized message loop?

  1. InitInstance
  2. Run
  3. ExitInstance
  4. OnIdle

Answer to Question 7

Question 8

What is the initial value of nCmdShow of AfxWinMain?

  1. SW_SHOW
  2. SW_NORMAL
  3. SW_SHOWMAXIMIZED
  4. It depends on the operating system.

Answer to Question 8

Question 9

Which function displays a floating pop-up menu at the specified location?

  1. CreatePopupMenu
  2. TrackPopupMenu
  3. GetSubMenu
  4. FloatMenu

Answer to Question 9

Question 10

Which function clears all the contents of the list box or combo box?

  1. DeleteAll
  2. ClearAll
  3. ResetContent
  4. DeleteItems

Answer to Question 10

Question 11

Which function of edit control allows you to set the password character?

  1. SetPassword
  2. SetPasswordItem
  3. SetPasswordChars
  4. SetPasswordChar

Answer to Question 11

Question 12

Which function retrieves the check state of a button control?

  1. GetState
  2. GetCheck
  3. GetButtonCheck
  4. GetValue

Answer to Question 12

Question 13

Which scrollbar function allows you to set the page size?

  1. SetScrollRange
  2. SetRange
  3. SetPageSize
  4. SetScrollInfo

Answer to Question 13

Question 14

Which member function of CProgressCtrl advances the current position by the step increment?

  1. SetStep
  2. MoveIt
  3. StepIt
  4. UpdateIt

Answer to Question 14

Question 15

The base class of CDocument is?

  1. CCmdTarget
  2. CObject
  3. CWinThread
  4. None of the above

Answer to Question 15

Question 16

Which function sets a flag indicating that you have modified the document since it was last saved?

  1. SetModified
  2. IsModified
  3. SetModifiedFlag
  4. UpdateData

Answer to Question 16

Question 17

Which functions returns the document associated with the view?

  1. GetViewDocument
  2. GetDocument
  3. GetDocuments
  4. GetCurDocument

Answer to Question 17

Question 18

Which of the following statement is wrong?

  1. One document can have multiple views
  2. One view can have multiple documents
  3. In SDI the main frame window is derived from class CFrameWnd
  4. In MDI the main frame window is derived from class CMDIFrameWnd

Answer to Question 18

Question 19

What is the base class of CFileDialog?

  1. CDialog
  2. CWnd
  3. CCommonDialog
  4. CCommonDlg

Answer to Question 19

Question 20

Which member function returns the full path of the selected file of CFileDialog?

  1. GetPathName
  2. GetFileName
  3. GetPathFileName
  4. GetFullPath

Answer to Question 20

Answers

Answer 1 - C

Back to question 1

Answer 2 - D

Back to question 2

Answer 3 - C

Back to question 3

Answer 4 - B

Back to question 4

Answer 5 - A

Back to question 5

Answer 6 - D

Back to question 6

Answer 7 - B

Back to question 7

Answer 8 - D

Back to question 8

Answer 9 - B

Back to question 9

Answer 10 - C

Back to question 10

Answer 11 - D

Back to question 11

Answer 12 - B

Back to question 12

Answer 13 - D

Back to question 13

Answer 14 - C

Back to question 14

Answer 15 - A

Back to question 15

Answer 16 - C

Back to question 16

Answer 17 - B

Back to question 17

Answer 18 - B

Back to question 18

Answer 19 - C

Back to question 19

Answer 20 - A

Back to question 20

Copyright © 2000 to 2011 Genesis InSoft Limited. All Rights Reserved.