Tuesday, September 23, 2025

vc++

Unit-1
Unit Name

I. Each Question Carries 1 Mark.

1) VC++ is ________________.
a) A Package b) A Language c) An Application Framework d) None

2) VC++ is product of ___________
a) Microsoft b) Sun Micro c) IBM d) None

3) VC++ is having _____________editions
a) One b) Two c) Three d) None

4) ATL Stands for___________________.
a) Active Template Library b) Archive Transaction Library
c) Auto Transmission Library d) None

5) The area on the left side of developer studio, is the key to navigate the various pieces and parts of development projects.
a) Workspace pane b) Out pane c) Navigation pane d) None

6) ________________Allows to find and edit each of resource in the application.
a) Class view b) File view c) Resource View d) None

7) _______________Allows to view and navigate all the files of application
a) Class view b) File view c) Resource view d) None

8) Every Application project needs its own ___________________in VC++.
a) Directory b) Project workspace c) File d) None

9) Windows and other plat forms supports_______________API.
a) win32 b) win16 c) both d) None

10) How many steps are there to create an application through wizard.
a) 5 b) 7 c) 8 d) None

11) ________________allows to select multiple items.
a) Combo box b) List box c) None d) None

12) A combo box is a combination of __________,___________.
a) Combo box, list box b) Edit box, list box c) list box, group box d) None

13) A mnemonic is the ________________character.
a) Underlined b) bold c) both d) None

14) To add a Member variable MFC is providing_______________-.
a) MFC ATL Wizard b) class wizard c) both d) None

15) A Command Button is having by default_________________messages
a)BN_CLICKED,BN_DOUBLECLICKED b)BN_SELECT, BN_DBSELECT
c) Both a & b d) None

16) Update Data (TRUE) is used for get the _______________from the screen.
a) Old values b) Current values c) Both a & b d) None

17) ________________ member function is used for to enable or disable all controls.
a) Disable Enable() b) Enable Window() c)Both a & b d) None

18) A Mouse is having _________________messages
a) 10 b) 9 c) 8 d) None

19) Online Dialog() is a member function of___________________.
a) CWinDialog b) C dialog c) CDailogWindow d) None

20) ______________________ is Message Handler, which is going to use to handle a cursor.
a) C Cursor b) HCURSOR c) Both a & b d) None


21) HCURSOR is ________________.
a) Structure b) Class c) Union d) None

22) Set Cursor() member function requires __________________ message handler.
a) WM_CURSOR b) WM_SETCURSOR c) Both d) None

23) Set Icon() allows to set __________________ Icons.
a) Big, small b) only Big c) Only small d) None

24) The Set Timer() member function is having the following series of arguments
a) Clock Timer, No. of Events to be triggered , Address of callback
b) Address of callback, clock timer, No of Events to be triggered, Clock Timer
c) None

25) Which is the function to stop the timer.
a) Stop Timer() b) KillTimer c) StopperTime() d) None

26) How many timer one can run at the same time in an application.
a) Only One b) Only Two c) More than one d) None

27) Every application project needs its own project _____________.
a) Class View b) File View c) None

28) Every Dialog box starts with OK and cancel button but you can add as many of your own as you want.
a) True b) False c) Both a & b d) None

29) __________are used to select only one of a number related options.
a) Checkboxes b) Radio Buttons c) Both d) None

30) ________________action check boxes enables or disables the controls dealing with displaying the user message.
a) Enable Window b) Enable Message c) Disable Window d)Destroy Window


Each Question carries 2 Marks

1) A) Workspace is having _______________views after creating an application.
a) Class, Resource, File b) Class, Edit, File c) File, Code, Class d) None

B) _________________Allows to navigate and manipulate source code.
a) Source View b) Class View c) Resource view d) None

2) A) A ________________is used for to display compiler warnings, error messages, variables with their current values.
a) Work Space b) Out Pane c) Editor Ares d) None

B) Every Dialog box starts with ________, __________buttons.
a) Ok, Cancel b) Yes, No c) Ok, Cancel, Ignore d) None

3) A) Update Data() member function takes ____________.
a) Only One Argument b) Only Two Arguments c) Nil d) None

B) ______________are used to select only one of a number of related options.
a) Radio buttons b) Check boxes c) Edit boxes d) None

4) A) A_____ member function allows to open an other applications (like .exe files).
a) Win Exe() b) Win Exec() c) Open Exec() d) None

B) The Track Popup Menu, member of C menu function takes ________________.
a) Only Five b) Only Four c) Only Three d) None

5) A) __________is used to convert current position to a screen position.
a) Client To Screen (&m_ pPoint) b) ScreenToClient(&m_pPoint)
c) Both d) None



6) A) The standard toolbar contains most of the standard tools
a) True b) False c) Both a & b d) None

B) The application icon can be edited to display an image to represent the application
a) True b) Flase c) Both a & b d) None

7) A) Many window application will find buttons, checkboxes, text fields etc,. which are knows controls.
a) True b) False c) Both a & b d) None

B) A combination of edit and text box is called as list box
a) True b) False c) Both a & b d) None

8) A) A drop-down list box that contains list of items which are added
a) False b) True c) Both a & b d) None

B) A mnemonic is specified by placing an ampersand in front of the character while typing caption value.
a) True b) False c) Both a & b d) None

9) A) Every control is required a variable to interact with it
a) True b) False c) Both a & b d)None

B)The Update Data function take the data in the variables for updating
a) True b) False c) Both a & b d) None

10) A) We use Show Window() function to display or hide a specified window
a) True b) False c) Both a & b d) None

B) GetDlg Item() passed ID of the controls and returns object of that control.
a) True b) False c) Both a & b d) None

11) A) SW_SHOW allows to display a window in normal mode
a) True b) False c) Both a & b d) None

B) Win Exec ( ) requires two arguments such as filename, show mode
a) True b) False c) Both a & b d) None

12) A) The user may not interact with mouse and keyboard
a) True b) False c) Both a & b d) None

B) if( (n Flags &MK_LBUTTON)==MK_LBUTTON) it checks if left mouse button is clicked or not
a) True b) False c) Both a & b d) None

13) A) SetIcon(m_hIcon,1) to set small icon
a) True b) False c) Both a & b d) None

B) set Icon(m_hIcon,0) to set big icon
a) True b) Flase c) Both a & b d) None

14) A) Is char=char (n Char) it converts the key pressed to a character
a) True b) False c) Both a & b d) None

B) Load Standard Cursor() allows to load only standard cursors from operating system.
a) True b) False c) Both a & b d) None

15) A) AfxGetApp( ) provides all functions of current application
a) True b) False c) Both a & b d) None

B) To edit cursor we use WM_SETCURSOR
a) True b) False c) Both a & b d) None

16) BOOL C mouseDlg :: On Set Cursor(CWnd *p,UINT h,UINT msg) {} The third parameter tells how many times that windows thinks the key has been pressed. The process works by loading the cursor into memory.
a) True b) False c) Bo0th a & b d) None

17) A) When the user changes the cursor, default processing by passed and FALSE is returned.
a) False b) True c) Both a & b d) None
B) ________specifies to place WM_TIMER event in the application message queue.
a) NULL b) Reference Value c) Both a & b d) None



18) void CMouseDlg::OnTimer(IDEVENT)
{}
IDEVENT describes which timer triggered this event.
a) True b) False c) Both a & b d) None

19) Set Timer(ID_CLOCK,1000,NULL)
i) The second argument is tells us ho often event has to be triggered.
ii) The third argument is the address of an optional callback function.
a) True,False b) False, True c) True,True d) None


Each Question carries 4 Marks

1) VC++ does not support
i) Active Template Library
ii) MFC data binding
iii) Microsoft Transaction server
a) Only i & ii b) only iii c) Only iii, i d) None

2) i) Class view allows to navigate and manipulate your source code
ii) Resource view allows finding and editing each of resources in the application
iii) File view allows you to view and navigate all files of application
a) Only i & ii b) Only ii c) Only iii d) only i & ii & iii

3) Arrange the following statements to create simple application.
i) Generating project workspace
ii) Creating application framework using application wizard
iii) Rearranging the dialog created by application wizard to resemble the design we want
iv) Adding Finishing touches to the application
v) Adding the c++ code to show the greeting to the user.
a) i, ii, iii, iv, v b) i, ii, ii, v, iv c) iii, v, i, iv, ii d) None

4) i) Appwizard makes skeleton of the application and windows programs.
ii) Appwizard makes DLLs, Activex controls, console applications
iii) Appwizard makes libraries; make file, Internet server extensions and filters and more within short period.
a) Only i & iii b) only i, ii, iii c) only iii d) None

5) i) Many of the controls are built into the operating system itself.
ii) Check boxes are used to set options on or off.
iii) Every dialog box start with OK & NO buttons
iv) A combo box is a combination static text and edit box
a) Only i & ii b) Only ii & iii & iv c) Only iii & I d) None

6) Arrange the following steps that can be used to specify the tab order to move around the window
i) Select either the dialog window or one of the controls on the window in the editing area of the developer
studio
ii) Choose Layout Tab order from the menu. By turning on the tab order
iii) Using the mouse, click each of the number boxes in the order user have to navigate the window. The
controls will renumber themselves to match the new order
iv) To return to the layout edit, select layout/tab order once again
a) only i, iii, iv, ii b) all c) iv, ii, i d) None

7) Which are the following statements are true
i) A mnemonic is specified by placing an ampersand (&) in front of the character while typing the caption value.
ii) OnInitDialog() function return data type is BOOL
iii) The UpdateData function takes the data in the variables and updates the controls with the variable values.
iv) All controls are themselves windows
a) only i, iv b) only iii, iv c) only i, ii, iii d) All

8) Match the following descriptions
SET A SET B
i) WM_LBUTTONDOWN a) A key has been pressed down
ii) WM_LBUTTONUP b) The left mouse button has been pressed
iii) WM_KEYDOWN c) The Left mouse button has been released
iv) WM_KEYUP d) A key has been released
a) i-b, ii-c, iii-a, iv-d b) i-a, ii- b, iii- c, iv- d c) i- d, ii- a, iii-c, iv-b d) None




9) Which of the following code is true to draw a pixel on window when u move a mouse pointer.
i) void CmouseDlg::OnMouseMove(UINT nFlags, Cpoint point) { SetPixel(point.x, point.y, RGB(0,0,0)); }
ii) void CmouseDlg::OnMouseMove(UINT nFlags, Cpoint point) { CpaintDC dc(this); dc.SetPixel(point.x,
point.y, RGB(255,0,0)); }
iii) void CmouseDlg::OnMouseMove(UINT nFlags, Cpoint point) { CclientDC dc(this);dc.SetPixel(point.x,
point.y, RGB(0,0,0)); Cdialog::OnMouseMove(nFlags,point);}
a) only ii, iii b) only iii c) only i, iii d) None

10) Which of the following statement are true void CmouseDlg::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
i) The First argument is the character code of the character.
ii) The Second argument is the number of times key is pressed.
iii) The third argument tells how many times that window thinks the key has been pressed
a) only i true b) only i, ii true c) only i, ii, iii are true d) None

11) Which of the following statements are true.
i) The Timer events are placed only in the application event queue if that queue is empty and the application is
idle.
ii) Windows places timer event messages in the application event queue if the application is already busy.
iii) Windows places only a single timer message in the event queue.
a) only i b) only i, iii c) only i, ii, ii d) All

12) Which of the following statements are true MessageBox(“msg”,”msg”, msg);
i) The argument being the message to be displayed to the user.
ii) The second argument, being displayed in the title bar on the message box
iii) The third argument can be used to specify the buttons and icons to be presented to the user beside the
message.
a) only i b) only i, ii c) only iii, ii d) All

13) Which of the following statements are true
i) To update the window , it executes UpdateData(0)
ii) The method DoModal, does not waits for the user to click one of the two buttons on the dialog.
iii) Pull_down menu is common in windows based applications.
a) only i, iii b) only ii c) only i, ii,iii d) None

14) Which of following statements are true
i) Standard pull down menu, which is the submenu that opens to the right of menu entry and is similar to pull
down menu
ii) Cascading menu, which pops up in the middle of the application area, floating freely above the application
work are
iii) Context menu or popup menu, this menu drop down below the category, with number of menu entries to
trigger various functions
a) only i,ii,iii b) only ii c) only i, iii d) None

15) Find out the following code output
void CmenuDlg::OnOK()
{
Cstring str=”Acme “;
MessageBox(str=” “,””);
}

i) it displays message box with message
ii) it gives compile time error
iii) it gives run time error
iv) only message box with out message

a) only i b) only ii, iii c) only iv d) None















Key for 1 mark





1 c 2 a 3 c 4 a 5 a
6 c 7 b 8 b 9 a 10 c
11 b 12 b 13 a 14 b 15 a
16 b 17 b 18 b 19 b 20 b
21 a 22 b 23 a 24 a 25 b
26 c 27 c 28 a 29 b 30 b





Key for 2 Marks





1 A) a B) b 2 A) b B) a 3 A) a B) a 4 A) b B) a 5 A) a
6 A) a B) a 7 A) a B) a 8 A) b B) a 9 A) a B) a 10 A) a B) a 11 A) a B) a 12 A) b B) a 13 A) b B) b 14 A) a B) a 15 A) a B) b 16 a 17 A) b B) a 18 a 19 c






Key for 4 marks



1 D 2 D 3 B 4 B 5 A 6 B 7 D 8 A 9 B 10 C 11 B 12 D 13 A 14 D 15 C 16. A









nit-2

1) The windows operating system gives a number of preexisting dialog boxes known as _______________.
a) Dialog Boxes b) Message Boxes c) Edit Boxes d) None

2) Basically menus can be classified under __________categories.
a) Only One b) Only Two c) Only Three d) None

3) By default windows based applications are having __________________menu
a) Standard Pull down b) Cascading c) Popup or context d) None

4) Basically A keyboard shortcuts, or accelerators are having __________________combination.
a) Multiple Keys b) Single Key c) None

5) How many steps are there to add Context Menu.
a) One two steps b) only six steps c) Only eight steps d) None

6) The editor area is basically the entire developer studio area that is not occupied
a) Panes b) menus c) Tool bars d) All

7) A_______________is base class of MFC
a) Cdialog b) Cobject c) CDC d) None

8) API stands for
a) Application programming interface
b) Active programming interface
c) Automation programming interface
d) None

9) A_____________ contains information about attributes of device
a) Device Context b) Logical Context c) Both d) None

10) CclientDC, CpaintDC, CwindowDC, CMetafileDC are derived from
a) HDC b) CDC c) DDC d) None

11) The Create Font() member function takes ______________
a) Only 10 Arguments b) Only 13 arguments c) Only 14 arguments d) None

12) Default tool bar can be identified by
a) IDR_TOOLBAR1 b) IDR_MAINFRAME c) IDR_TBAR d) None

13) Wizard creates by default __________________ object for application.
a) Def app b) the App c) None

14) String table is used for
a) To maintain resource id’s information b) To maintain class view information
c) To maintain file view information d) None

15) _____________message raises when right mouse button has been double-clicked.
a) WM_RBUTTONDBLCLK b) WM_RBUTTONDBLCLICKED
c) WM_RBDOUBLECLK d) None

16) _______ message raises when left mouse has been released
a) WM_LBUTTONREL b) WM_LBUTTONUP c) WM_LBUTTONEXIT d) None

17) __________ message raises when key has been pressed down.
a) WM_KEYPRESS b) WM_KEYDOWN c) Both d) None

18) _______________member function is used to get the current time.
a) GetTimeNow() b) GetCurrentTime() c) Now() d) None

19) Reset Content() is used for _____________.
a) To reset the values b) To Clear the values c) Both d) None

20) What is the use of the following statement m-fSampFont.Detach()
a) To release the current font b) To create new font
c) Both d) None


21) ___________ is used to set the font.
a) Add Font(&font) b) SetFont(&font) c) AttachFont(&font) d) None

22) ________ specifies the output quality and how carefully the GDI must attempt to match the logical font attributes to the physical font output.
a) CLIP_MASK b) PROOF_QUALITY c) OUT_PRECIS d) None

23) The DoModal() waits for the user to click one of the two buttons on dialogs box.
a) OK & No b) Yes & Cancel c) ok & cancel d) None

24) Basically menu’s can be classified into ___ categories
a) 1 b) c) 3 d) None

25) The Hotkeys are ________ that are underlined in each menu entry.
a) Letters b) Numbers c) Special Chars d) None

26) Adding function to the menu it we use _________
a) COMMAND b) UICOMMAND c) ID_COMMAND d) None

27) LOGFONT is a___________
a) Structure b) Class c) Data Type d) None

28) ENUMLOGFONTEX is a___________
a) Structure b) Class c) Data Type d) None

29) ResetContent() is used to ________
a) to set contents b) to make ascending order c) to clear contents d)None

30) which is list box notify handler
a) LBN_SELCHANGE b) LBS_CHANGE c) CBS_CHANGE d)None


2-marks

1) The following statement m_1Menu=GetMenu() ; is used for
a) To get a pointer to the window menu
b) To get a pointer to the first sub menu
c) To get a pointer to the parent window
e) None

2) A) Dialog boxes are divided into ___________categories.
a) Only One b) Only Two c) Only Three d) None

B) The resource compiler creates….
a) Executable (.res) files b) Object (.obj) files c) Script (.rc) files d) None

3) A) Mainly the device context used two resources to perform most of ___________
a) Drawing, graphic functions b) graphic, device functions
c) None

B) What is the constant value for OEM_CHARSET
a) 0 b) 2 c) 255 d) None

4) A) which is class to create font
a) C Font b) LOGFONT c) HFONT d) None

B) _____________Makes the pop_up menu triggered from the left mouse button.
a) TPM_RIGHTBUTTON b) TPM_LEFTBUTTON c) TPM_LBUTTON d) None

5) A) __is the primary resource tool for drawing any kind of line onscreen.
a) Cbrush b) Cpen c) Cline d) None

B) ____________specifies to draw a dotted line
a) PS_DOTTED b) PS_DOT c) PS_DASDOT d) None

6) A)________allows to create brushes which define filling of areas.
a) CRBrush b) Cbrush c) both d) None

B)What is Use of the following statement m_bmpBitmap.Attach(hBitmap)
a) To Attach the currently loaded bitmap to the bitmap object
b) To Remove current bitmap from bitmap object
c) None

7) The device context is one , which contains information about ____
a) System b) Window c) both d) None

8) The Bitmap will take
a) 8 – by 8 pixels b) 8 by 8 square c) both d) None

9) Cbitmap class requires ___________structure
a) HBITMAP B) CBITMAP C) Both d) None

10) CpaintDc calls automatically BeginPaint and EndPaint
a) True b) False c) Both a & b d) None


4 Marks Questions


1) To display TrackPopuMenu we use the following code is
i) void CmenuDlg::OnContextMenu(CWnd * pwnd, Cpoint point)
{ CMenu *m ; CPoint px; px=point; ClientToScreen(&px);
m=GetMenu(); m=m->GetSubMenu(0);
m->TrackPopupMenu(TPM_CENTERALIGN,px.x, px.y, this, NULL);
}
ii) void CmenuDlg::OnContextMenu(CWnd * pwnd, Cpoint point)
{ CMenu *m ; CPoint px; px=point; ClientToScreen(&x);
m->TrackPopupMenu(TPM_CENTERALIGN,px.x, px.y, this, NULL);
}
iii) void CmenuDlg::OnContextMenu(CWnd * pwnd, Cpoint point)
{ CMenu *m ; px=point; ClientToScreen(&x);
m=GetMenu(); m=m->GetSubMenu(0);
m->TrackPopupMenu(TPM_CENTERALIGN,px.x, px.y, this, NULL);
}
a) only i b) only i, iii c) only ii d) None

2) Which of the following statements are true
i) The fourth argument of Track Popup Menu function is a pointer to the window that receives the menu
command messages.
ii) By passing Null argument as a last parameter through Track Popup Menu we can close popup menu
when we click out side of that.
iii) Enum Font Proc is used to receive the list of fonts.

a) only i b) only i, ii c) All d) None

3) Which of the following statements are true
i) The EnumFontFamiliesEx function is used to receive the list of fonts
ii) The EnumFontProc is used to request the list of available fonts.
iii) On Creation of callback function, it must be defined as an independent function..
a) only i b) only ii c) only iii d) All

4) Which of the following statements are true
i) FONTENUMPROC is structure, which contains the information about devices contexts
ii) LOGFONT is structure , which contains the information about the fonts that has to be listed.
iii) EnumFontFamiliesEx function takes 6 arguments
a) only i b) only ii c) only iii d) None

5) Match the following descriptions with A & B
SET A SET B
i) FW_DONTCARE d a) it specifies the pitch and family of the font.
ii) OEM_CHARSET c b) it specifies how closely the output must
match the requested font height, width,
orientation, escapement
iii) OUT_RASTER_PRECIS b c) it specifies the font character set
iv) FIXED_PITCH a d) it specifies the font weight

a) i-d, ii-c, iii-b, iv-a b) i-a, ii-b, iii-c, iv-d c) i-d, ii-a, iii-c, iv-b d) None


6) Which of the following statements are true
i) C pen, the instance of this class is used to specify the color and width for drawing lines on screen.
ii) C brush, allows to create brushes which define filling of areas.
iii) C bitmap class is using the resource ID of the bitmap
iv) Group box control allows to set group of control like radio, check buttons
a) only i, ii, iii, iv b) only ii, iv c) only i, iii d) None

7) Which of the following code is true to attach the image to bigmap
i) HBITMAP hbitmap= LoadImage(AfxGetInstanceHandle(), filename, image_bitmap, 0,0,
LR_LOADFROMFILE, LR_CREATEDIBSECTION); M_bitmap.Attach(hbitmap);
ii) HBITMAP hbitmap= LoadImage(AfxGetInstanceHandle(), filename, image_bitmap, 0,0,
LR_LOADFROMFILE, LR_CREATEDIBSECTION);M_bitmap.Detach(hbitmap);
iii) HBITMAP hbitmap= LoadImage(AfxGetInstanceHandle(), filename, image_bitmap);
M_bitmap.Attach(hbitmap);
iv) HBITMAP hbitmap=(HBITMAP):: LoadImage(AfxGetInstanceHandle(), filename, image_bitmpa, 0,0,
LR_LOADFROMFILE, LR_CREATEDIBSECTION); M_bitmap.Attach(hbitmap);
a) only i , iv b) only ii, iii c) only iv d) None

8) What is output of the following code
M_dlg is instance variable of CDialog
BOOL CgraphicsDlg::OnInitDialog()
{
Cdialog::OnInitDialog();
UpdateData(0);
M_dlg.Create(IDD_HAI_DLG, this);
M_dlg.ShowWindow(SW_SHOW);
return 1;
}
i) it displays DoModal dialog box and closes automatically
ii) It displays domodal dialog box , it waits for user to click a button
iii) it displays Modeless dialog box , it waits for user to click a button
iv) it displays Modeless dialog box , closes automatically
a) only ii b) only iii c) only iv d) only i

9) Which of the following statements are true
i) Whenever a window needs to be redrawn, it calls OnPaint() member function
ii) OnPaint() is member function of CclientDC class
iii) OnPaint() function explicitly calls Invalidate()
iv) ON_WM_PAINT is message handler of OnPaint()
a) only i, ii, ii b) only i, iii, iv c) All d) None

10) What is use of the following code
void CgraphicsDlg::OnLButtonDown()
{
UpdataData(1);
m_dlg.Invalidate();
}
i) It terminates the window
ii) It displays error for user i.e. the window is not valid.
iii) It Repaints the window
a) only i, ii b) only ii c) only iii d) None

11) Match the following color description with A & B
SET A SET B
i) RGB(0,0,0) a) Black
ii) RGB(255,255,255) b) White
iii) RGB(0,255,255) c) Cyan
iv) RGB(255,0, 255) d) Magenta
v) RGB(255,255,0) e) Yellow

a) i-a, ii-b, iii-c, iv-d, v-e b) i-e, ii-d, iii-c, iv-b, v-a c) i-a, ii-e, iii-c, iv-b, v-d d) None

12) Which of the following statements are true
i) Cpen mypen(PS_SOLID, 1, RGB(255,0,0));
ii) Cbrush mybrush(HS_DIAGCROSS, RGB(255,255,0));
iii) Cbrush mybrush(RGB(192,192,192));
iv) Ellipse function draws a only ellipse
a) only i, ii, iii b) only ii, iii, iv c) only ii, iv d) None


13) Which of the following statements are true
i) CfileDialog file(1,”.bmp”,bitmap,OFN_HIDEREADONLY,szFilter)
ii) CDC dc; CpaintDC *pc; dc.CreateCompatibleDC( pc)
iii) Pc->StretchBld(10,10,5,5,2)
iv) ShowBitmap(&dc);
a) only i, ii b) only iii, iv c) only iv d) None

14) If (dilaog.DoModal()==IDOK)
a) it displays only dialog box b) it capture the result
c) both d) None

15) I) bitmap.Detach() to detach the bitmap
ii)bitmap.DeleteObject() to remove the current bitmap select which are the true statements
a) I b) ii c) Both d) None


One Marks Answers



1 B 2 C 3 A 4 B 5 B
6 A 7 B 8 A 9 B 10
11. 12. 13 14 A 15 A 16 B 17 B 18 B 19 B 20 B
21 A 22 B 23 C 24 C 25 A
26 A 27 A 28 A 29 C 30 A




Two Marks Answers




1 a 2 A) b B) b 3) A) a B) b 4 A) a B) b 5 A) b B) a 6 A) b B) a 7 a 8 C 9 a 10 a




4 Mark Questions




1 A 2 C 3 C 4 D 5 A
6 A 7 A 8 B 9 B 10 C 11 A 12 A 13 D 14 C 15 C






Unit 3

VC ++ BITS
ACME COLLEGE OF IT
MALAKPET, HYDERABAD
_____________________________________________________________

Each Question carries 1 mark


1) An ActiveX control is a_____________________
a) Hardware component b) software component c) both d) None

2) An ActiveX used to be called____________
a) OLE 2.0 b) OLE 2.1 c) OLE d) None

3) The ActiveX technology is built on top of Microsoft ________ technology
a) COM b) ECOMM c) Both d) None

4) I Dispatch is an
a) Interface b) function c) Procedure d) None

5) An ActiveX server can also be an ___________
a) ActiveX Container b) ActiveX Server c) Both d) None

6) Internet Explorer is implemented as an_____________
a) ActiveX Server b) ActiveX Container c) interface d) None

7) ActiveX controls can not run on their own and must be embedded within ______
a) ActiveX Container b) ActiveX Server c) Both d) None

8) I dispatch is also known as __________
a) Interaction Dispatch b) Disp interface c) Internet Disp d) None

9) The Container provides _______Idispatch interfaces to the control.
a) Only One b) Only Two c) Only Three d) None

10) To interaction between the ActiveX container and an ActiveX control takes place through ____________Idispatch interfaces.
a) Only One b) Only Two c) Only Three d) None

11) To Register a control with operating system what type of coding is used
a) c:\windows|system>regsvr32 myctl.ocx b) c:\windows|system>regsvr32 myctl.exe
c) c:\windows|system>regs myctl.ocx d) None

12) what is the memberfunction to get the number of columns from flexgridcontrol
a) GetCols() b) GetTotCols() c) GetNumCols() d) None

13) To Redraw back on flex grid_____is used
a) SetDraw(position) b) SetRedraw(FALSE) c) SetRedraw(1) d) None

14) ___________provided the functionality of a edit box control. Can be used to implement simple text_editor functionality.
a) Clist View b) CtreeView c) CeditView d) None

15) A____________class dynamically sizes itself to accommodate the number of items placed in it.
a) CobArray b) Carray c) both d) None

16) ___________ is the class that displays visual representation of the document for user.
a) Cdocument b) Cview c) ClistView d) None

17) SDI stands for_____________
a) Single Document interface b) Serial Document interface c) both d) None

18) CsingleDocTemplate class is used to create_________.
a) MDI b) SDI c) None


19) A______class is used to create multiple document.
a) CmultiDocTemplate b) CmdiDocTemplate c) CmultipleDocument d) None

20) SetModifiedFlag() is used to make a document as ______________
a) Exe file b) Res file c) Directory d) None

21) To capture the mouse we use
a) SetCapture() b) GetCapture() c) LoadCapture() d) None

22) PaintBrush applicatin is a example for________
a) MDI b) SDI c) Both d) None

23) To get a pointer to the Document object we use
a) Get Document () b) GetObjDocument() c) SetDocument() d) None

24) The MessageMap for menu item is____________
a) ON_MENUITEM b) ON_COMMAND c) both d) None

25) The MessageMap for OnLButtonDown function is __________
a) ON_LBUTTONDOWN b) ON_WM_LBUTTONDOWN c) None

26) The Message Map for OnTimer function is _____________
a) ON_WM_TIMER b) WM_TIMER c) None

27) Cbitmap class allows to load __________dynamically from files on the system disk.
a) bitmap images b) jpg files c) mpeg files d) None

28) The Invalidate() is member function of______________
a) CWnd b) Cbitmap c) CcpaintDC d) None

29) ___________is message handler of OnCreate() member function
a) ON_CREATE b) WM_CREATE c) ON_WM_CREATE d) None





Key for 2 Marks

1) A) What is use of the following statement object. Serialize (array)
a) Pass the serialization on to the object array b) To create an object
c) None

B) Serialize function requires the address of _______________ as argument
a) C Archive b) Cob Array c) both d) None

2) A) To implement serialization we use
a) DECLARE_SERIAL,IMPLEMENT_SERIAL b) BEGIN_SERIAL, END_SERIAL
c) Both d) None

B) IMPLEMENT_SERIAL requires ________________arguments
a) Only One b) Only Two
c) Only Three d) None

3) A) To check or uncheck a menu item we use
a) GetCheck() b) SetCheck() c)PutCheck() d) None

B) OLE stands for
a) Object Linking Embedding b) Object Linking electronics
c) None


4) A) COM stands for
a) Component Object Model b)Component Object Module c) None

B) To Create Tool Bar we use
a) C tool Bar b) C tool c) C tool Menu d) None

5) A)___________allows to create a tool bar that can have multiple rows of buttons
a) TBSTYLE_BUTTONS b) TBSTYLE_WRAPABLE c) Both d) None

B) _____________message handler places a border on the bottom edge of the tool bar when the top of
the toolbar is not docked
a) TBSTYLE_BORDER_BOTTOM
b) CBRS_BORDER_BOTTOM
c) None

6) A) ______ toolbarfunction enables the toolbar for docking with the frame window.
a) EnableDock() b) EnableDocking() c) EnableWindow() d) None
B) CtoolBar is derived from a) Cwnd b) CframeWnd c) Cbrush d) None
7) A)______function is used to hide the tool bar. a) HideControlBar() b) ShowControlBar() c) Both d) None
B) ShowControlBar() requires __________arguments a) Only one b) Only two c) Only Three d) None

8) A) COLORREF is a structure data type for ______________function
a) RGB() b) BGR() c) Both d) None

B) ______________is used to control the behaviour of toolbar butons
a) GetButtonStyle() b) SetButtonStyle() c) Both d) None

9) A) To get the index of tool bar butons we use.
a) IndexButtonToolBar() b) CommandToIndex() c) None

B) To pass the address of the tool bar we use
a) ToolBarAddBar() b) DockControlBar() c) None

10) A) To load a toolbar we use
a) GetToolBar() b) ReceiveToolBar() c) LoadToolBar() d) None

B) ______class allows to get the rectangular co ordinates
a) CCRect b) Rect c) Crect d) None

11) A) LoadString is member function of
a) ClistBox b) CcomboBox c) Cstring d) None

B) SetButtonInfo member function takes _________arguments
a) 1 b) 2 c) 4 d) None

12) A) To add horizontal scrollbar to the window we use
a) WS_HSCROLL b) WS_HORIZSCROLL c) None

B) ON_CBN_SELCHANGE is message handler of ____________
a) ClistBox b) CcomboBox c) Both d) None

13) A) To get the index of current selected item from the combo box we use
a) SetCurSel() b) GetCurSel() c) CurIndexSel() d) None

B) What is the use of the following statement
Cview *v=GetNextView(position)
a) To get a pointer to the view in that position
b) To Read document information from that position
c) Both
d) None




14) A) OnDrarw() is member function of ________
a) Cview b) Cdocument c) Both d) None

B) 143.BEGIN_MESSAGE_MAP() requires ________arguments
a) 1 b) 2 c) 3 d) None

15) A) BEGIN_MESSAGE_MAP(___,____) is having the series of parameters
a) Derived b) Base c) Both d) None

B) BEGIN_MESSAGE_MAP(), END_MESSAGE_MAP should be defined in
a) header file b)source file c) Both d) None

16) A) DECLARE_MESSAGE_MAP is declared in.
a) header file b) source file c) None

B) To Create a label control we use
a) Edit Box b) Combox Box c) StaticText d) None

17) A) To Create a Edit box we use
a) Cedit b) CeditBox c) Both d) None

B) To Create a ProgressBar we use
a) CprogressBar b) CprogressCtrl c) None






4 Marks
1) Which of following statements are true
i) An activex control is a software component that can be plugged into many different programs and used
as if it were a native part of program.
ii) ActiveX used to be called OLE 2.0 , whicn as MS technology for combining two or more applications to
make them work as one
iii) The activex technology defines a layer that is built on top of COM, what interfaces various objects
should support, and how different type of objects should interact.
iv) Automation enables an application embedded within another application to activate itself and control its
part of the user interface or document.
a) only i, iv b) only iii, ii c) only iv d) All the above

2) Which of the following statements are true
i) Idispatch allows to the automation, which consists of a pointer to a table of available methods that can
be run in the Activex control or embedded application.
ii) The Container provides three Idispatch interfaces to the control
iii) The first Idispatch interface argument is used by control to trigger events in the container application.
a) only i, ii b) only ii, iii c) only i, iii d) None

3) i) Some activex servers are also applications that can run on their own.
ii) Before adding the active x control to the window, control has to be registered with both windows and
visual c++
iii) The cells in the flexgrid control are numbered sequenctially from left to right, top to bottom.
a) only i, iii b) only ii, iii c) only i, ii, iii d) None




4) Match the following descriptions with A & B
SET A SET B
i) CeditView a) It provides scrolling capabilities to a Cview class
ii) CtreeView b) it provides character and paragraph formatting
functionality
iii) ChtmlView c) The base class for views containing controls.
Iv) ClistView d) it provides the functionality of edit box
a) i-a, ii-b, iii-c, iv-d b) i-b, ii-d, iii-c, iv-a c) i-c, ii-a, iii-d, iv-b d) None

5) Which of the following statements are true
i) Each catch section specifies the type of exception it handles.
ii) A try section can be placed around the code
iii) GetSize() is member function of CobArray class
iv) Adding the functionality to save and restore the drawings known as serialization
a) only i, iii b) only ii, iv c) only i, ii, iii d) All

6) which of the following statements are true
i) An MDI application uses a window_in_a_window style, where there is a frame window around one or
more child windows.
ii) Architecturall, an MDI application is similar to an SDI application.
iii) ON_COMMAND_RANGE,ON_UPDATE_COMMAND_UI_RANGE , are standard message map entries,
but the class wizard does not support.
iv) When using the ON_COMMAND_RANGE message map entry, the event message ID is automatically
passed as an argument to the event handler fuction.
a) only i, iv b) only iii, ii c) only i, ii, iii d) All

7) Which of the following statements are true
i) A tool bar is small band attached to the window frame or dialog that is floating independent of the
application frame.
ii) We can display a tool bar top of the window only
iii) The LoadToolBar, requires the ID for the toolbar that is to be created
a) only i, ii, iii b) only ii c) only iii d) None

8) Match the following descriptions with A & B

SET A SET B

i) TBSTYLE_ALTDRAG a) it creates a tool tip control that can be used
to display descriptive text for the window
ii) TBSTYLE_FLAT b) it Button text appears to the right of the
bitmap image
iii) TBSTYLE_LIST c) creates a flat toolbar. Button text appears
under the bitmap images
iv) TBSTYLE_TOOLTIPS d) allows the user to move the tool bar by
dragging it while holding down the Alt key

a) i-a , ii-b iii-c iv-d b) i-d, ii-c iii-b d-a c) i-a, ii-d, iii-c iv-b d) None

9) Match the following descriptions with A & B

SET A SET B

i) CBRS_BORDER_TOP a) Places a border on the top edge of the
toolbar when the top of the toolbar is not
docked
ii) CBRS_BORDER_FLYBY b) Causes status bar message text to be
updated for the toolbar buttons at the
same time as the tooltips
iii) CBRS_GRIPPER c) Causes a gripper to be drawn on the
toolbar
iv) CBRS_TOOLTIPS d) Causes ToolTips to be displayed for
the toolbar buttons

a) i-a, ii-b, iii-c, iv-d b) i-d, ii-c, iii-b, iv-a c) i-a, ii-d, iii-c, iv-b d) None






10) Which of the following statements are true.
i) TBSTYLE_CHECK creates a button that acts like a checkbox, toggling between the pressed and
un pressed state
ii) TBSTYLE_NOPREFIX, the button text will not have an accelerator prefix associated with it
iii) TBSTYLE_GROUP, creates a button that remains pressed until another button in the group is pressed
iv) TBSTYLE_SET, creates a seperator, making a small gap between the buttons on either side.
a) only i, iv b) only iii, ii c) All d) None

11) Match the following descriptions with A & B
SET A SET B

i) CBS_HASSTRING a) The owner of the list box is responsible for
drawing the list box contents. The
contents of the list are variable in height
ii) CBS_OEMCONVERT b) The owner of the list box is responsible for
drawing the list box contents. The list box
items consist of strings.
iii) CBS_OWNERDRAWFIXED c) Text entered in the edit control is
converted from ANSI to the OEM character
set & then back to ANSI.
iv) CBS_OWNERDRAWVARIABLE d) The owner of the list box is responsible for
drawing the list box contents. The contents
of the list are fixed in height.
a) i-a, ii-b, iii-c, iv-d b) i-b, ii-c,iii-c,iv-d c) i-d, ii-c, iii-b, iv-d d) None




Key For 1 Mark


1 b 2 a 3 a 4 a 5 a 6 a
7 a 8 b 9 b 10 c 11 a 12 a
13 b 14 c 15 a 16 a 17 a 18 b
19 d 20 c 21 b 22 b 23 a 24 b
25 b 26 a 27 a 28 a 29 c




Key For 2 marks


1. A) a B) a 2.A) a B) c 3. A) b B) b 4. A) a B) a 5. A) b B) b 6. A) b B) a
7. A) b B) c 8. A) d B) b 9. A) b B) b 10. A) c B) c 11. A) c B) c 12. A) a B) b
13. A) b B) a 14. A) a B) b 15. A) c B) b 16. A)a B) c 17. A) a B) b



Key for 4 marks


1. D 2. C 3.C
4. D 5. D 6. D 7. A
8. B 9. A 10. C 11. A





Unit 4

One Marks Questions

1) DAO stands for
a) Data Active Object b) Data Access Object c) both d) None

2) ADO stands for
a) Active Data Object b) ActiveX Dynamic Object c) ActiveX Data Object d) None

3) Serialisation is having two parts they are___________
a) Serialisation, de_serialization b) Serialisation, Un serialization
c) None

4) When application data is stored on the system drive in the form of a file, then it’s called
a) Serialization b) De_Serialisation
c) Un Serialisation d) None

5) When the application state is restored from the file, then it’s called
a) Serialisation b) De_Serialisation c) Un Serialisation d) None

6) Serialisation in visual c++ application is accomplished through the____
a) C serial b) CD serial c) C archive d) None

7) The C archive class is designed to act as an_____________ stream for a C file Object
a) Input b) Output c) both d) None

8) The C archive class can not exist without a _____________class object.
a) C archive b) C file c) C data d) None

9) Is Storing() or Is Loading() are Member function of _________
a) C file b) C data c) C archive d) None

10) ADO objects are divided into ___________types.
a) 1 b) 2 c) 3 d) 6

11) ___________is not a object of ADO .
a) Connection b) Command c) Field d) None

12) _____________object used for establishing and maintaining a connection to a database
a) Connection b) Record set c) Field d) None

13) ____________ object willl have error information from the database.
a) Data Error b) Error c) Error Data d) None

14) To Execute SQL statements we use
a) Run SQL object b) Command object c) Execute SQL object d) None

15) _______object is used for passing variables and for calling stored procedures.
a) Procedure b) parameter c) Stored Data d) None

16) ________object represents a single column in the Record Set and contains the column name, data value.
a) Column b) Row Column c) Field d) None

17) A Field Object always contain a ___________data type value.
a) Int b) Static INT c) variant d) None

18) A link between vc++ and database
a) ODBC b) OLE c) ActiveX d) None

19) ________allows to import active x DLL
a) #import b) #include c) #elf d) None

20) ActiveX files are having an _____________extention name
a) .exe b) .res c) .ocx d) None




21) To Initialize COM environment for the application we use
a) Co Initialize (NULL) b) Com Initialize() c) Init Com Env() d) None

22) To shut down the COM environment by calling the ____________function.
a) Shutdown() b) Init Shut Down() c) Co Un initialize() d) None

23) Connection PTR is used to____________
a) to create a connection to the database b) to close the connection
c) None


Key Form I mark

1.B
2. C 3. A 4. A 5. B
6. C 7. C 8. C 9. C
10. D 11. 12. A 13. B
14. B 15. B 16. C 17. C
18.A 19.A 20. C 21. A
22. C 23. A



Each Question carries 2 Marks

1) A)ODBC is __________
a) An Interface b) A Structure c) Macro d) None

B) A______ class contains the database connection information.
a) C Database b) C record Set c) Both d) None

2) A) A_______class will run the query and maintain the set of records that are return by the database
a) C Database b) C record Set c) Both d) None

B) ____allows only to read_only set of records that can only be scrolled from the first to the last record
a) C record Set :: forward Only b) C record set :: Dina set
c) C record Set ::dynamic d) None

3) A) _____is used to move a specific number of records from the current record or from the first record in the set.
a) Move Previous b) Move To c) Move d) None

B) ____function return the number of records in the record set
a) Get Count() b) Get Count Record() c) Get Record Count() d) None

4) A) The Set Absolute Position function takes _________
a) 1 argument b) 2 arguments c) 3 arguments d) None

B) _____allows to moves the specified number of rows from the current row.
a) SQL_FETCH_NEXT b) SQL_FETCH_NOROW c) SQL_FETCH_ABSOLUTE d) None

5) A) ____allows to return the current SQL query to refresh the record set.
a) Refresh() b) Re Query() c) Re SQL() d)Re Retrieve()

B) What is the use of the given following statement.
CrecordSet *p=OnGetRecordSet()
a) To get a pointer to the record set b) To get a pointer to the record view
c) To get a pointer to the database d) None

6) A) _______technology was intended to be much more than simply a way of getting data into and out of databases.
a) ODBC b) DAO c) OLEDB d) None

7) A) PCH stands for
a) Precompiled header file b) Post compiled header file c) Both d) None

B) The ID of MB_OK
a) IDOK b) IDYES c) Both d) None

8) A) MB_ABORTRETRYIGNORE displays ______buttons on message box
a) yes, no, ignore b) ok, no, ignore c) abort, retry, ignore d) None

B) _________Dialog box does not allow to remove with out access
a) Do Modal b) Modeless c) None

9) A) To display Modal dialog box we use
a) Do Modal() b) Create Dialog() c) Both d) None

B)____raises when context menu button is pressed
a) WM_CONTEXTMENU b) ON_CONTEXTMENU c) None

10) A) A ______class allow to invoke menu member functions
a) HMENU b) C menu c) Both d) None

B) Load Menu() is used for
a) To Load a Menu b) To Load Popup menu c) None

11) A) What is the use of the following statement
menu.GetSubMenu(0)
a) To get the first sub menu b) To get the second sub menu
c) None

B) _________ is used to add menuitems, popupmenu’s to the menu bar
a) AppendMenuItem() b) AddMenuItem() c) AddPopupmenu() d) None

12) A) All menu’s in menu bar index starts with ____
a) 1 b) 0 c) 3 d) None

13) A) OnNewDocument()is a function of
a) Cdocument b) Cview c) Both d) None

B). OnNewDocument() function return type is ________
a) BOOL b) Boolean c) Cdocument d) None

14) A) CADORecordBinding does not have ___________
a) Constructor b) Destructor c) Both d) None.

B) What is use of given statement
Carchive &ar<a) To Write b) To Read c) Both d) None

15) A) SetIndicators() is member of function of_____,which is going to use to add panes.
a) CtoolBar b) CstatusBar c) Cmenu d) None

16) A) CMDIChildWnd is derived from ______
a) CchildFrame b) CMDIChild c) CframeWnd d) None

B) CreateInstance() is used to pass the UUID of the ____________object.
a) Connection b) RecordSet c) Field d) None

17) A) CommandText is a property of ___________object
a) RecordSet b) Command c) Connection d) None

B)______class will have only series of macros, along with number of variables.
a) CADORecordBinding b) CADORecordVtr c) CADORecord d) None

18) A) IADOAecordBinding is__________
a) an interface b) memberfunction c) Structure d) None

B) BEGIN_ADO_BINDING,END_ADO_BINDING are used to access
a) data values b) interfaces c) database objects d) None

19) A) BEGIN_ADO_BINDING is macro, which takes the _______ as its only parameter.
a) class name b) function name c) None

B) ADO_FIXED_LENGTH_ENTRY is _________
a) a macro b) a structure c) a class d) None


20) A) ADO_NUMERIC_ENTRY allows____________fileds.
a) Text b) Variant c) Numeric d) None

B) _Variant is ___________data type
a) variant b) Numeric c) character d) None

21) A) UUID stands for
a) Universal Unique Identification b) User unique Identification
c) None

B) CADORecordBinding is a class, which in defined in the _________header file.
a) afxado.h b) afxwin.h c) icrsint.h d) None

22) A) The set of macros are closed by the ______________
a) CLOSE_ADO_MACROS b) END_ADO_BINDING c) END_ADO_MACROS d) None

B) varchar is nothing but
a) variable_length character string b) variable fixed character string
c) character string d) None

23) A) ActiveConnection is a property of
a)__ConnectionPtr b) __CommandPtr c) __RecordSetPtr d) None

B) ADO is intended to use in _______________scripting languages.
a) Sun Micor b) Microsoft’s c) AT&T d) None
24) OnDraw() member function takes ________class object.
a) CDC b) Cpoint c) Cbitmap d) None


Key for 2 marks

1 A) a B) a 2 A) b B) a 3 A) c B) c 4) A) a B) d 5 A) b B) a
6 A) c 7 A) a B) a 8 A) c B) a 9 A) a B) a 10 A) b B) a
11 A) a B) a 12 A) b 13 A) a B) a 14 A) d B) a 15 A) a
16 A) b B) a 17 A) b B) a 18 A) a B) a 19 A) a B) a 20 A) c B) a
21 A) a B) c 22 A) b B) a 23 A) a B) b 24 A) a





PART -C
Each Question carries 4 Marks

1) which of the following statements are true.
i) The GetNextView, returns a pointer to the view specified by the position
ii) The Status bar can be provided about what the user is doing, where in the document user is editing
iii) ON_COMMAND() requires two arguments
iv) The SetIndicators function is called on the statusbar to add panes as they are defined in the indicators
table.
a) only i, iv b) only ii, iv c) i, ii, iii d) all

2) which of the following statements are true
i) vc++ provides five different technologies for using and accessing database.
ii) Carchive uses c++ streams to enable efficient data flow to and from the file that is the storage of the
application data.
iii) Serialization is having combination of five parts.
a) only i, ii, iii b) only i, iii c) only ii d) None

3) which of the following statements are true
i) Passing the serialization object that is used to write to or read from the file.
ii) A serialization function can be placed in any classes
iii) The DECLARE_SERIAL macro takes a single argument, the class name.
a) only i, ii b) only ii, iii c) only i, ii, iii d) None

4) which of the following statements are true
IMPLEMENT_SERIAL(CmyClass, Cobject, 1)
The above arguments are determines

i) First : the class name, as in the DECLARE_SERIAL macro
ii) Second: argument is the name of the base class, from which class is inherited
iii) Third: Version number that can be used to determine whether a file is the correct version for reading
into the application.
a) only iii b) only ii c) only i d) All

5) which of the following statement are true
i) when creating a form based application, it is assumed that application will not hold multiple record in the
form .
ii) The GetFirstViewPosition function is used to get the position of the view object
iii) When opening an existing data set, there should be add new records
a) only i, ii b) only ii c) only ii, iii d) None

6) Which of the following statements are true
i) IsBOF returns TRUE if the current record is the first record in the set
ii) IsEOF returns TRUE if the current record is the last record in the set
iii) Requery returns the current SQL query jto refresh the record set
iv) The Move function will take two arguments
a) only i, iv b) only iii, ii c) All d) None

7) Match the following descriptions
SET A SET B
i) SQL_FETCH_RELATIVE a) Moves to the previous row
ii) SQL_FETCH_PRIOR b) move the specified number of rows
iii) SQL_FETCH_LAST c) moves to the last row
iv) SQL_FETCH_ABSOLUTE d) move the specified number of rows from
the start of the set of rows
a) i-a, ii-b, iii-c, iv-d b) i-b, ii-a, iii-c, iv-d c) i-d, ii-a, iii-c, iv-b d) None

8) which of the following statements are true
i) The connection object is having the information of database connectin,database location,user
id,password before opening the connection.
ii) The error object will have the error information from the data base, whenever database error occurs
iii) The Record Set object contains a set of records from the database the Parameter object is used for
passing variables and for calling stored procedure.
a) only i, ii, ii b) only iv c) All d) None

9) Which of the following statements are true
i) The #import pre_compiler directive is used to import any .exe files
ii) Before using any of the ADO objects, the COM environment has to be initialized
iii) The ADO_FIXED_LENGTH_ENTRY macro is used for any database fields that are not fixed in size.
a) only i, ii, iii b) only i, iii ) only ii d) None

10) Which of the following code is true to import ADO DLL
i) #import “c:\program Files\Common Files\System\ADO\msado15.dll”
ii) #import “c:\program Files\Common Files\System\ADO\msado15.dll”
rename_namespace{ “ ADOCG”} rename (“EOF”, “EndOfFile”)
using namespae ADOCG
iii) #import “c:\program Files\Common Files\System\ADO\msado15.dll”
rename_namespace{ “ ADOCG”} rename (“EOF”, “EndOfFile”)
using namespae ADOCG
#include “icrsint.h”
iv) #define INITGUID
#import “c:\program Files\Common Files\System\ADO\msado15.dll”
rename_namespace{ “ ADOCG”} rename (“EOF”, “EndOfFile”)
using namespae ADOCG
#include “icrsint.h”

a) only i, ii b) only iv c) only iii d) None


1. D 2. C 3.C 4. D
5. A 6.C 7 A 8.C
9. C 10.B