188840750-bc0053-visual-basic

Upload: jeffrey-gillespie

Post on 04-Jun-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/13/2019 188840750-Bc0053-Visual-Basic

    1/19

    Visual Basics KARROX COLLEGE OF TECHNOLOGY & MANAGEMENT

    www.karrox.com Helpdesk: 66710528 [email protected]

    Page 1 of 19

    PART A

    1. Visual Basic

    A) is a windows programming language that hasbeen developed at Microsoft CorporationB) is one of the RAD tools as it enables the

    programmer to develop application very quicklyand easilyC) is a powerful programming language todevelop sophisticated program quickly

    D) All the above

    2. ____ are items that appear on a form, likecommand button, scroll bar, or check box

    A) MethodB) Procedure

    C) Objects

    D) Events

    3. ____ includes the VB development

    environment and use of standard tools to developapplication

    A) Professional Edition

    B) Learning EditionC) Enterprise EditionD) All the above

    4. An ____ file is designed to help you runprograms on a Web site

    A) Active X Document DLLB) Active X Document EXEC) Active X Control

    D) Addln

    5. In VB Interface, ____ list all the files thatmake up a single VB program

    A) Properties WindowB) Project ExplorerC) Form Layout Window

    D) Toolbox

    6. ____ enables you to debug your VB program

    A) Immediate WindowB) Project WindowC) Form Layout Window

    D) All the above

    7. To exit form VB application, press

    A) Alt + P

    B) Alt + EC) Alt + QD) Alt + O

    8. Declaring the local variable using the ____keyword preserves its value even when aprocedure ends

    A) StateB) PublicC) Dim

    D) Private

    9. Customs controls are controls available in a

    separate files with extensions ____

    A) .CCXB) .OCX

    C) .VBXD) .EXE

    10. A Function procedures can:

    A) assign valuesB) return values

    C) set reference to object

    D) All the above

    11. The ____ statement transfer control to Subprocedure, function procedure or dynamic linklibrary procedure

    A) Sub

    B) CallC) SetD) Let

    12. MDI application are used to launch multipledocuments from a main document as in the caseof

    A) Microsoft WordB) Microsoft Excel

    C) Both A) and B)

    D) None of the above

    13. Submenu is used when:

  • 8/13/2019 188840750-Bc0053-Visual-Basic

    2/19

    Visual Basics KARROX COLLEGE OF TECHNOLOGY & MANAGEMENT

    www.karrox.com Helpdesk: 66710528 [email protected]

    Page 2 of 19

    A) menu bar is full

    B) a particular menu control is seldom usedC) you want to emphasize one menu controlrelationship to another

    D) All the above

    14. ____ allow the user to open a menu pressing

    the Alt key and typing a designed letter

    A) Short cut keyB) Access key

    C) Auto key

    D) All the above

    15. One can open the ____ in one of the three

    ways- Output, Append or Input

    A) Sequential file

    B) Random Access file

    C) Binary filesD) All the above

    16. Menus can be created quickly by using the____

    A) Menu-editor utility

    B) RDOC) ADOD) all the above

    17. ____ providers a universal databaseconnectivity application programming interface

    that enables application to access data in a widerange of proprietary database

    A) Jet Database

    B) ODBC

    C) ISAM databaseD) All the above

    18. The ____ is only supported on 32-bitoperating systems such as Windows 95 &Windows NT

    A) ADO

    B) RDOC) DAO

    D) ODBC API

    19. The ____ property specific the type ofdatabase to open

    A) Read only

    B) ConnectC) RecordsetD) Refresh

    20. To add new record to a recordset, use the____ method

    A) AddNewB) AppendC) AddRecord

    D) SetNew

    21. What are the advantages of creating andaccessing structured database

    A) Lets to write programs that use existingdatabase

    B) Allows the application to share data with other

    programsC) Simplifies the programmingD) All the above

    22. ____ is the top level database object

    A) Workspace Object

    B) DB Engine ObjectC) Container ObjectD) Recordset Object

    23. The ____ method is used to add each field toits table and to add each table to the database

    A) AddFieldB) AddTableDefC) Append

    D) CreateField

    24. The ____ method is used to perform the SQLaction query

    A) EXECUTEB) DISPLAYC) SHOW

    D) IDENTIFY

    25. ActiveX controls have file name extension____

  • 8/13/2019 188840750-Bc0053-Visual-Basic

    3/19

    Visual Basics KARROX COLLEGE OF TECHNOLOGY & MANAGEMENT

    www.karrox.com Helpdesk: 66710528 [email protected]

    Page 3 of 19

    A) .ACX

    B) .AVT

    C) .OCXD) .OCT

    26. The DLL file

    A) is loaded and unloaded as needed by VB

    B) contains subprograms designed to be used asbuilding blocks when creating a standaloneprogramC) is in-process server

    D) All the above

    27. Which among these is not an part of the DataReport

    A) Data Report objectB) Application object

    C) Data Report control

    D) None of the above

    28. In the Data Report designer, ____ can be

    used for summary material, like conclusions orgrand totals using the Function control

    A) Report Header

    B) Page HeaderC) Report FooterD) Page Footer

    29. The ____ function returns the positions of thefirst occurrence of one string within another

    A) InstrB) StrlenC) Len

    D) String

    30. In the function Rnd [(number)], if numberis>0, Rnd generates:

    A) same number every time, using number asthe seedB) next random number in the sequence

    C) most recently generated number not supplied

    next number in the sequenceD) None of the above

    31. Which among these is the property of Err

    object

    A) Description, source

    B) Number, Helpline

    C) Helpcontext, last DLL Error

    D) All the above

    32. ____ error encountered when you Open,

    Read or Write simple files

    A) General file

    B) Physical mediaC) Program codeD) Database errors

    33. Use the ____ keyword to return to the

    location in the program that caused the error

    A) Resume Label

    B) Resume NextC) ResumeD) Resume Previous

    34. Identify the flags available to describe a pop-up behaviour

    A) Vb Popup Menu Right ButtonB) Vb Popup Menu Right AlignC) Vb Popup Menu CenterD) All the above

    35. Select the true statement

    A) Atleast one MDI child from must be loaded

    and visible when you access the Active FormProperty

    B) At runtime, child from are displayed within theinternal area of the MDI formC) None of aboveD Both A) and B)

    36. An application can have ____ MDI form/s

    A) Only one

    B) Only twoC) Only 6D) Unlimited

    37. OLE DB provides high performance access toany data source including ____

    A) Relational databaseB) Non relational database

  • 8/13/2019 188840750-Bc0053-Visual-Basic

    4/19

    Visual Basics KARROX COLLEGE OF TECHNOLOGY & MANAGEMENT

    www.karrox.com Helpdesk: 66710528 [email protected]

    Page 4 of 19

    C) Email and file systems, text and graphic

    D) All the above

    38. Which among these is not an methodsupported by VB

    A) Find CurrentB) Find Last

    C) Find PreviousD) None of the above

    39. Which among these is not an component of

    ADO data model

    A) ActiveX RecordsetB) ActiveX Connection

    C) ActiveX Data ControlD) None of the above

    40. While creating User Controls, when the user

    executes the complied operation, ____

    A) Design time instance is destroyed

    B) Run-time instance is createdC) Design time instance of the user control iscreatedD) All the above

    41. Any time a user presses a key, moves themouse or clicks the mouse button such an action

    is called an _____

    A) Event

    B) ProcedureC) FunctionD) Property

    42. The caption of a button represents a/an

    _____

    A) Trigger

    B) PropertyC) FunctionD) Alert

    43. _____ allows the user to open a menupressing the Alt key & typing a designated letter

    A) Short cut keyB) Access keyC) Secret key

    D) Word key

    44. The _____ function returns a string withoutthe trailing spaces

    A) Ltrim( )B) Trim( )C) Rtrim( )

    D) Strim( )

    45. A jet database is one with extension _____

    A) .jdb

    B) .mdbC) .mjbD) .jmd

    46. The _____ is only supported on 32 bitoperating system such as Windows 95 & Windows

    NT

    A) ADOB) ODBC API

    C) RDOD) DAO

    47. Which among these Find methods is not

    supported in VB

    A) FindNext

    B) FindCurrent

    C) FindPreviousD) None of the above

    48. The _____ are used to read & update datastored in Relational Database ManagementSystem that are external to VB & Microsoft jet

    Data engine

    A) ADO,DAOB) RDO,ADO

    C) RDO,RDCD) ADO,RDO

    49. The Data report designer consists of

    A) Section objectB) Data Report object

    C) Data Report ControlD) All the above

  • 8/13/2019 188840750-Bc0053-Visual-Basic

    5/19

    Visual Basics KARROX COLLEGE OF TECHNOLOGY & MANAGEMENT

    www.karrox.com Helpdesk: 66710528 [email protected]

    Page 5 of 19

    50. The _____ function returns the numbers

    contained in a string

    A) IntB) Val

    C) NumD) Str

    51. The Arguments of the MsgBox function is/are

    A) prompt, buttonsB) title, help file

    C) context

    D) All the above

    52. _____ error is encountered when you Open,

    Read or Write simple files

    A) Physical media

    B) General file

    C) Program codeD) All the above

    53. Pick the incorrect statement

    A) We have to explicitly declare or createvariables in VB

    B) A general procedure tells the application howto perform a specific taskC) Both A) & B)

    D) None of the above

    54. When a parameter is passed by reference

    A) The Copy of the original variable is sent ti thefunctionB) The address of the original variable is sent to

    the function

    C) The function can change the value of thevariable but the original is not changedD) All the above are true

    55. The constant value for the window style

    named argument, VbNormalFocus is_____

    A) 0B) 1

    C) 2D) 3

    56. The visual basic interface consists of forms

    and______

    A) tablesB) rows

    C) columnsD) objects

    57. Objects are items that appear on a______

    A) sheetB) page

    C) form

    D) table

    58. _______ is an example of an object

    A) windowB) user interface

    C) form

    D) command button

    59. Any time a user presses a key, moves the

    mouse , or clicks themouse button, such an action is called an______

    A) event

    B) toolC) controlD) state

    60. Use the _____ property to load MDI childwindow as hidden & leave them hidden until you

    display them using the show method

    A) AutoShowPropertyB) AutoShowChildren

    C) AutoHiddenShow

    D) AutoWindowShow

    61. To display the current record number use the_____ property of the Recordset object

    A) Resolve Position propertyB) Absolute Position propertyC) Display Position property

    D) Current Position property

  • 8/13/2019 188840750-Bc0053-Visual-Basic

    6/19

    Visual Basics KARROX COLLEGE OF TECHNOLOGY & MANAGEMENT

    www.karrox.com Helpdesk: 66710528 [email protected]

    Page 6 of 19

    62. If you want the Report Header to be the first

    page in the report, set its ForcePageBreak

    property to ____

    A) rpPageBreakAfter

    B) rptPageBreakbeforeC) rptPageBreakpreviousD) None of the above.

    63. A DLL file is ____server

    A) out-of-process

    B) in-process

    C) in-between-processD) None

    64. Which of the following ActiveX object cab beplaced on internet explorer?

    A) ActiveX DLL

    B) ActiveX DocumentC) ActiveX ExeD) Both A) and C)

    65. ______ is used to separate the items in themenu

    A) /B) -C) sep

    D) None of the above

    66. Which of the following characters indicate

    that words following it are comments?

    A) B) /

    C) //

    D) !

    67. ______ function returns a long number torepresent a length of a file in bytes

    A) Freefile (filename)B) Filelenght (filenameC) Length (filename)

    D) Filelen (filename)

    68. ________ is the most widely used interface

    to relational data

    A) ODBCB) JDK

    C) OLED) Jet database

    69. ____ provides a way to move and resizeforms and controls

    A) Pointer

    B) Painter

    C) IndicatorD) None of the above

    70. The properties that must be set to bind adata-bound control to a data control are_____

    A) data source

    B) Data FieldC) Both A) and B)D) Data Space

    71. Dynamic arrays are arrays whose size is setat

    A) compile timeB) runtimeC) design time

    D) None of the above

    72. String(5,450) returns _____

    A) 44444B) 45000C) 00450

    D) None of the above

    73. If 4 bit binary representation of 6 is shiftedright 4time them it yields

    A) 4B) 12C) 3

    D) 16

  • 8/13/2019 188840750-Bc0053-Visual-Basic

    7/19

    Visual Basics KARROX COLLEGE OF TECHNOLOGY & MANAGEMENT

    www.karrox.com Helpdesk: 66710528 [email protected]

    Page 7 of 19

    74. Which of the following methods cab be used

    to generate a preview of the Data Report?

    A) displayB) preview

    C) showD) view

    75. _______ Statement transfers control to a subprocedures, Function Procedure of Dynamic-linklibrary (DLL) procedure

    A) CALL

    B) LINKC) CONNECTD) None of the above

    76. _______ provide access to every availablevisual basic command

    A) properties windowB) pull-down menusC) toolbox

    D) project explorer

    77. The integer data type has a storage sizeof________

    A) 4 bytes

    B) 8 bytes

    C) 1 bytes

    D) 2 bytes

    78. The currency is a type of data whose storagesize is__________

    2 bytes

    8 bytes

    1 bytes4 bytes

    79. ___ is used to lock the record set duringediting only

    A) DbOptimistic

    B) DbpessimisticC) DbDynasetD) Dbreadonly

    80. ___ is the file extension of Ms-access database is

    A) .MDSB) .MDBC) .MDV

    D) .MDF

    PART B

    81. Match the following:

    Set A

    1. ActiveX DLL2. ActiveX EXE

    3. Standard EXE

    Set B

    a. is designed to work as an OLE server

    b. creates a stand-alone program

    c. contain subprograms designed to be used asbuilding blocks when creating a stand-alone

    program

    A) 1-c, 2-b, 3-aB) 1-b, 2-a, 3-c

    C) 1-b, 2-c, 3-aD) 1-c, 2-a, 3-b

    82. Match the following tools of VB toolbox withtheir description

    Set A1. Label2. Picture Box

    3. Frame

    Set B

  • 8/13/2019 188840750-Bc0053-Visual-Basic

    8/19

    Visual Basics KARROX COLLEGE OF TECHNOLOGY & MANAGEMENT

    www.karrox.com Helpdesk: 66710528 [email protected]

    Page 8 of 19

    a. displays text or acts as a visual container for

    other control

    b. provides a visual and functional container forcontrolsc. displays text a user cannot interact with or

    modify

    A) 1-a, 2-c, 3-b

    B) 1-c, 2-a, 3-bC) 1-a, 2-b, 3-cD) 1-c, 2-b, 3-a

    83. Select the true statement with reference to

    Procedure

    1. When we declare a variable within a

    procedure, only code within that procedure canaccess or change the value of that variable2. Variables used within a procedure are known

    as local variable

    3. At procedure level there is no differencebetween Private and Dim

    A) 1, 3B) 1, 2, 3C) 2, 3D) 1, 2

    84. Identify the type of module form the pointsgiven below

    1. This modules are foundation of object orientedprogramming in VB

    2. Can write code in this modules to create newobjects3. All properties and methods created can beused by other objects in the application

    A) Form moduleB) Standard moduleC) Class module

    D) System module

    85. Match the following Property procedure with

    their description

    Set A

    1. Property Get2. Property Set3. Property Let

    Set Ba. a procedure that sets a reference to an object

    b. a procedure that sets the value of a property

    c. a procedure that returns the value of a

    property

    A) 1-b, 2-c, 3-a

    B) 1-a, 2-b, 3-cC) 1-c, 2-b, 3-aD) 1-c, 2-a, 3-b

    86. What is the output of K and R in given codeK=100R=calc(K)

    Print K

    Print RFunction calc(j as integer) as integerJ=200

    Calc = jEnd function

    A) 100, 200

    B) 200, 100C) 200, 200D) None of the above

    87. Match the following value of window stylenamed argument in Shell function

    Set A1. Vb Minimized Focus2. Vb Normal Focus

    Set Ba. 0

    b. 1c. 2d. 3

    A) 1-c, 2-b

    B) 1-a, 2-bC) 1-b, 2-cD) 1-d, 2-a

    88. Identify the scroll bar events

    1. Change2. Property

    3. Scroll

    4. Sequence

    A) 2, 3

    B) 1, 3C) 2, 4D) 1, 2

  • 8/13/2019 188840750-Bc0053-Visual-Basic

    9/19

    Visual Basics KARROX COLLEGE OF TECHNOLOGY & MANAGEMENT

    www.karrox.com Helpdesk: 66710528 [email protected]

    Page 9 of 19

    89. Identify the clipboard methods

    1. Get Data()2. Set Data()

    3. Ger Format()4. Set Text5. Clear

    A) 1, 2, 3, 4, 5B) 1, 2, 3, 4C) 1, 2, 4, 5

    D) 2, 3, 4, 5

    90. Select the true statement with reference toPop-up menu

    1. It is a floating menu that is displayed over aform, independent of menu bar

    2. It is also called as Display menu

    3. Application that implement Pop-up menususually display the Pop-up menu when the userclicks the right mouse button

    4. Uses the following syntax:object. Popup Menu name [, flags[,x[,y[,bold command]]]]

    A) 2, 3, 4B) 1, 2, 3C) 1, 2, 3, 4

    D) 1, 3, 4

    91. What are the different types of dialog boxes

    1. Custom dialog box

    2. Common dialog box3. Standard dialog box

    4. Pre-defined dialog box

    A) 1, 2, 3B) 1, 3, 4

    C) 1, 2, 4D) 2, 3, 4

    92. Pick out the true statement with reference to

    Random Access Files

    1. It is like a database2. It is made up of records of identical size3. Each record is made up of fields that store

    data4. These accessed line by line and makes themideal for use in application that manipulate text

    files

    A) 1, 4B) 1, 2, 3

    C) 2, 4

    D) 2, 3

    93. Identify the agreement of open Database

    method of the Workspace object

    1. Options

    2. Connect

    3. Open4. Read Only

    A) 1, 4B) 2, 3, 4C) 1, 2, 3, 4D) 1, 2, 3

    94. Select the true statement with reference toSnapshot-type record set object

    1. It can be update2. is stored entirely in the workstation memory

    3. can be used with ODBC datasource4. enables to filter, sort, extract and update datafrom more than one table

    A) 1, 4

    B) 2, 3, 4C) 2, 3D) 1, 2, 3

    95. Identify different levels of locking provided bythe Microsoft Jet database

    1. Table locking

    2. Database locking3. Document locking

    4. Page locking

    A) 2, 3, 4B) 1, 2, 4

    C) 1, 2, 3D) 1, 3, 4

  • 8/13/2019 188840750-Bc0053-Visual-Basic

    10/19

    Visual Basics KARROX COLLEGE OF TECHNOLOGY & MANAGEMENT

    www.karrox.com Helpdesk: 66710528 [email protected]

    Page 10 of 19

    96. Pick out the true statement with reference to

    changing or deleting a field

    1. The individual field can be changed once it isappended to the Table Def

    2. A field can be deleted only if it is not a part ofany Index or Relation objects3. The delete method of the Table Def object is

    used to delete an individual field

    A) 1, 2B) 1, 2, 3

    C) 2, 3

    D) 1, 3

    97. Identify the incorrect statement

    1. The RollBack method cancels all the changesmade to data since the most recent Begin Trans

    method was invoked

    2. The Commit Trans Method commits allchanges made to the data since the most recentBegin Trans method was invoked

    3. The On Trans method begins a newtransaction

    A) 2, 3

    B) 1, 2, 3C) 1, 2D) 1, 3

    98. The ____ and ____ are used to read andupdate data stored in RDBMS which are externalto VB and Microsoft Jet Data engine

    1. RDO

    2. DAO3. ADO

    4. RDC

    A) 2, 3B) 1, 4

    C) 1, 2D) 2, 4

    99. Identify the ActiveX components

    1. ActiveX control2. ActiveX Document3. ActiveX Code

    4. ActiveX Form

    A) 1, 3, 4

    B) 1, 2, 4C) 2, 3, 4D) 1, 2, 3

    100. What is the output of the following?

    My Num = Fix (199.2)My Num = Int (-199.8)My Num = Fix (-199.2)

    A) 199, -199, -199B) 199.2, 200, -199

    C) 199, -200, -199

    D) 199.2, -199, 199

    101. Choose the correct statement with reference

    to custom controls

    1. Are always included in the Toolbox2. Are controls available in separate files with file

    extension OCX3. These includes specialized controls, such asthe common dialog control

    A) 1, 3B) 1, 2, 3

    C) 1, 2D) 2, 3

    102. Select the true statement with reference to

    variable used within a module

    1. By default, a module level variable is availableto all the procedures in that module & to code in

    other module

    2. Can create module level variables bydeclaration section at the top of the module

    3. At module level there is no difference between

    Private & Dim

    A) 2, 3

    B) 1, 2C) 1, 3D) 1, 2, 3

  • 8/13/2019 188840750-Bc0053-Visual-Basic

    11/19

    Visual Basics KARROX COLLEGE OF TECHNOLOGY & MANAGEMENT

    www.karrox.com Helpdesk: 66710528 [email protected]

    Page 11 of 19

    103. Relate the following types of modules with

    their descriptions

    Set A

    1. Class module2. Standard module3. Form module

    Set Ba. are containers for procedures and declarations,commonly used by other parts of the applications

    b. are foundations of any VB application

    c. are foundation of object oriented programming

    A) 1 c, 2 b, 3 a

    B) 1 a,2 b, 3 cC) 1 c, 2 a, 3 bD) 1 a, 2 c, 3 b

    104. List the flags that is available to describe apop-up menus location

    1. VbPopupMenuCenterAlign2. VbPopupMenuRightAlign3. VbPopupMenuLeftButton4. VbPopupMenuLeftAlign

    5. VbPopupMenuRightButton

    A) 1, 2, 4

    B) 3, 5

    C) 2, 3, 4, 5D) 1, 2

    105. Identify the Data Control properties &Methods

    1. Exclusive property2. Refresh method3. ReadOnly propert

    4. Recordset property

    5. Connect property

    A) 1, 2, 3, 4, 5

    B) 2, 3, 4, 5C) 1, 3, 4, 5D) 1, 2, 3, 4

    106. What are the Programming advantages of

    the ability to create & access structured database

    systems

    1. Lets to write programs that use existing

    database2. Allows the application to share data with otherprograms

    3. Simplifies your programming since you do notneed to handle low level file accessing &searching

    A) 2, 3

    B) 1, 2C) 1, 2, 3D) 1, 3

    107. What are the different components toaccess data provided by ado

    1. ActiveXConnection2. ActiveXDataControl3. ActiveXTableDef

    4. ActiveXRecordset

    A) 1, 3, 4B) 1, 2, 3

    C) 1, 2, 4D) 2, 3, 4

    108. State whether the following statement are

    true or false(T/F)

    1. The library functions are prewritten routinesthat are included as an integral part of the

    language

    2. DHTML application allow to respond to eventsin an HTML page

    3. Can create any Web server components when

    you create a DHTML application

    A) 1 F, 2 T, 3 T

    B) 1 T, 2 F, 3 TC) 1 T, 2 T, 3 FD) 1 T, 2 T, 3 T

  • 8/13/2019 188840750-Bc0053-Visual-Basic

    12/19

    Visual Basics KARROX COLLEGE OF TECHNOLOGY & MANAGEMENT

    www.karrox.com Helpdesk: 66710528 [email protected]

    Page 12 of 19

    109. _____ and _____ are used to a read and

    update data stored in relational Data BaseManagement systems (RDBMS) that are externalto visual basic and Microsoft jet Data Engine

    A) RDO, RDCB) RDO, SDO

    C) RDB, DDBD) RDO, ADB

    110. State which of the statement is false.

    i. Dirlistbox control displays and allows a user toselect directors and pathii. Drive list box control displays and allows the a

    user to select from a list of filesiii. Shape control adds a rectangle, square, ellipseor circle to a form

    iv. The OLE is used to displays the list of dll files

    used in VB applicationv. The Image control displays the bitmaps, iconsand allows user displays the list of files

    A) i, iv, vB) ii, iv, vC) ii, iii, iv

    D) i, ii, iii

    111. State which of the following statement istrue which is related to data control property.

    i. Connect Property Specifies the type ofdatabase to open. It can include arguments suchas user ID and password.

    ii. In Exclusive Property other application can be

    able to open the database during the otherapplication has open the database

    iii. ReadOnly property determines whether or not

    you can update the database.

    A) i, iii

    B) iC) i, iiD) i, ii, iii

    112. Which of the following sentences is true?

    i. Project Explorer lists all the files that make upa single VB program

    ii. From provides a window where we can drawobjectsiii. To prevent overlap of windows Overlap help is

    provided by VBiv. OLE stands for Objects linking, andEmbedding

    A) i, ii, iii

    B) i, iii, ivC) iii, ivD) i, ii, iv

    113. Which of the following program is used to ofAccess database using DAO?

    i. Dim ws as DAO

    Dim Db as DatabaseSet ws=DAO.workspacesSet Db=ws(c:\emp)

    ii. Dim ws as wokengineDim Db as databaseSet ws=dbengine.workspaces(0)

    Set db=ws.opendatabase(c:\emp)

    iii. Dim ws as workspacesDim db as databaseSet ws=dbengine.workspaces(0)

    Set db=ws opendatabase(c:\emp.mdb)

    A) ii

    B) iii, ivC) iiiD) iv

    114. Which of the function can be used to changethe given word to a uppercase and to find thelength of the same?

    A) Ucase(), len()B) Uppercase() Length()C) Upperc(), Length()

    D) Ucase(), lengh()

    115. In form unload to destroy the instance and

    free the memory use command

    A) Set my class=destroyB) set my class=free#

    C) Text1. Text=zeroD) Set my class=Nothing

  • 8/13/2019 188840750-Bc0053-Visual-Basic

    13/19

    Visual Basics KARROX COLLEGE OF TECHNOLOGY & MANAGEMENT

    www.karrox.com Helpdesk: 66710528 [email protected]

    Page 13 of 19

    116. What is the output of the following function?

    Len(LTrim(Round(230.55)))

    InStr(Trim(Round(230.55)), 2)

    A) 3.1

    B) 3, 3C) 1,3

    118. Append method is used to add each_____to its table and to add each _____to thedatabase

    A) Field, columns

    B) Fields, tableC) Datatype, rowD) Recordset, table

    119. Dim mystring As String

    Dim rag As StringDim vid As Stringmystring = Manipal IT Education

    rag = Mid(mystring, 1, 7)vid = Mid(mystring, 20)rag =?

    Vid =?

    A) Manipal, TB) Mani, E

    C) Manipal, n

    D) Manipal, Edu

    D) 3, 7

    117. Select the true statement with reference to

    IIS Application

    1. This uses, HTML to present its user interfaceand uses compiled VB code to process requests

    and responds to events in the browsers2. Can be used on the Internal and not Intranet3. Use the ASP object model

    A) 1, 3B) 2, 3C) 1, 2

    D) 1, 2, 3

    120. Match the following tools available in thetoolbox which is used to draw control on theforms

    Set A1. Label2. Pointer

    3. Frames

    Set Ba. provides a visual and functional container for

    controlsb. provides a way to move and resize forms andcontrols

    c. displays text a user cannot interact with or

    modify

    A) 1 a, 2 c, 3 bB) 1 b, 2 c, 3 aC) 1 c, 2 b, 3 aD) 1 b, 2 a, 3 c

    PART C

    121. Match the following fundamental data typeswith their storage size

    Set A

    1. Long2. Boolean

    3. Currency4. Decimal

    Set B

    a. 2b. 8

  • 8/13/2019 188840750-Bc0053-Visual-Basic

    14/19

    Visual Basics KARROX COLLEGE OF TECHNOLOGY & MANAGEMENT

    www.karrox.com Helpdesk: 66710528 [email protected]

    Page 14 of 19

    c. 4

    d. 14

    e. 16

    A) 1-e, 2- a, 3-c, 4-b

    B) 1-c, 2- d, 3-a, 4-eC) 1-c, 2- a, 3-b, 4-dD) 1-e, 2- c, 3-b, 4-d

    122. What is the output of the given VB codeRedim d Array (1 to 10) as integerDim K as integer

    For K=1 to 10

    D Array (K) =kPrint d Array (K)Next

    Redim Array (1 to 5) as integerFor K = 1 to 5Print d Array (K)

    Next

    A) Output will be numbers 1 to 10B) Output will be numbers 1 to 10 and 1 to 5

    C) Output will be numbers 1 to 5D) No output error in the code

    123. Pick out the true statement with reference

    to MDI application

    1. your application can have only one MDI form,

    which contains all the applications child form

    2. An MDI application allows the user to displaymultiple documents at the same time, with each

    document displayed in its own window3. A least one MDI child form must be loaded andvisible when you access the Active Formproperty, or an error is returned

    4. you can show an MDI child form or the MDI

    form with the modal argument

    A) 1, 3, 4

    B) 1, 2, 3, 4C) 2, 3, 4D) 1, 2, 3

    124. Write a valid code to create MAP.TXT and

    store the contents to the string variable My stringand the contents of the numeric variable My

    number into the file

    A) File Num = Free FileOpen MAP.TXT For Input As File Num

    Write #File Num, My String My NumberClose File NumB) File Num = Free File

    Open MAP.TXT For Output As File Num

    Write #File Num (My String My Number)

    Close File NumC) File Num = Free FileOpen MAP.TXT For Output As File Num

    Write #File Num #My String #My NumberClose File NumD) File Num = Free File

    Open MAP.TXT For Output As File NumWrite #File Num, My String My NumberClose File Num

    125. Select a valid code to write the string My

    first home page into the file Web.txt starting atbyte location 100

    A) My String = My first home pageFile Num = Free FileOpen Web text for Integer As File Num, 100

    Get#File Num, 100, My String

    Close File NumB) My String = My first home pageFile Num = Free File

    Open Web text for Binary As File NumGet#File Num, 100, My StringClose File NumC) My String = My first home page

    File Num = Free FileOpen Web text for Binary As File NumGet#File Num, 100, My String

    Close File Num

    D) None of the above

    126. Match the following Data Access objectswith their descriptions

    Set A

    1. Workspace object

    2. Recordset object3. Property object4. Document object

    Set B

    a. includes information about one instance of atype of object

    b. corresponds to a cursored view into a

    database table or the result of a queryc. is used to support simultaneous transactions

    and its acts as a container for open database

    d. represent built in characteristics or a userdefined characteristics of a data access object

    A) 1-b, 2-c, 3-a, 4-dB) 1-b, 2-c, 3-d, 4-aC) 1-c, 2-b, 3-a, 4-d

  • 8/13/2019 188840750-Bc0053-Visual-Basic

    15/19

    Visual Basics KARROX COLLEGE OF TECHNOLOGY & MANAGEMENT

    www.karrox.com Helpdesk: 66710528 [email protected]

    Page 15 of 19

    D) 1-c, 2-b, 3-d, 4-a

    127. Identify the methods that are used tonavigate through the Recordset

    1. Record Count2. Move Previous3. Update

    4. Insert New5. Delete6. Move Next7. Move First

    A) 1, 2, 3, 4, 5, 7B) 2, 3, 4, 5, 6, 7C) 1, 2, 3, 5, 6, 7

    D) 1, 2, 3, 4, 5, 6, 7

    128. What are the standard ActiveX controls

    available in the Learning Edition of VB

    1. Common dialog2. DB Grid

    3. DB List4. MS Flex Grid5. DB Select6. DB Combo

    A) 1, 2, 3, 4, 6B) 1, 2, 3, 4, 5, 6

    C) 2, 3, 4, 5, 6

    D) 1, 2, 4, 5, 6

    129. Select the true statement with reference toUser Control Object

    1. It can contain code as well as Visual Objects

    2. It is like the form object and adding controls to

    it is similar to adding controls to a form object3. This files has the extension UTL and thegraphical elements on the user controls is stored

    in files with extension UTX

    4. The user control object created may be used inany application and the user may resize the UserControl

    5. It is the foundation for creating and ActiveX

    control

    A) 2, 3, 4, 5

    B) 1, 2, 4, 5C) 1, 2, 3, 5D) 1, 2, 3, 4

    130. Identify the events that are executed when

    the user runs the application in the process of

    creating User Control

    1. Terminate

    2. Write Properties3. Resize4. Paint

    5. Read Property6. Initialize7. Init Property

    A) 1, 2, 3, 4, 5, 6

    B) 2, 3, 4, 5, 6, 7C) 1, 2, 3, 4, 5, 6, 7D) 2, 4, 5, 6, 7

    131. What are the features of the Data Reportdesigner

    1. Textbox Controls2. Print Preview3. Drag and drop functionality for fields

    4. Export Templates5. File Export6. Asynchronous Operation

    A) Except 6B) All the aboveC) Except 4

    D) Except 5

    132. What are the controls that are automaticallyplaced in the Toolbox tab named Data Report.When a new Data Report Designer is added to aproject

    1. Rpt LAbel2. Rpt Text Box3. Rpt Procedure

    4. Rpt Function5. Rpt Image6. Rpt Line7. Rpt Shape

    A) 1, 3, 4, 5, 6, 7B) 1, 2, 3, 4, 5, 7

    C) 1, 2, 4, 5, 6, 7

    D) All the above

    133. In the given expression,

    Search Str = XXpXXpXXpXXpSearch Char = PMy Pos = Instr (4, Search Str, Search Char, 1)

  • 8/13/2019 188840750-Bc0053-Visual-Basic

    16/19

    Visual Basics KARROX COLLEGE OF TECHNOLOGY & MANAGEMENT

    www.karrox.com Helpdesk: 66710528 [email protected]

    Page 16 of 19

    My Pos = Instr (1, Search Str, Search Char, 0)

    My Pos = Instr (1, Search Str, Search Char)

    My Pos = Instr (1, Search, W)What does the above code returns?

    A) 6, 9, 9, 0B) 5, 0, 9, NullC) 6, 0, 0, 0

    D) 5, 9, 9, Null

    134. Match the following error code with theirmessages

    Set A

    1. 582. 61

    3. 714. 76

    Set B

    a. Path not foundb. Path/file access errorc. File already exists

    d. Disk not readye. Disk Full

    A) 1-d, 2-c, 3-e, 4-b

    B) 1-d, 2-c, 3-e, 4-aC) 1-c, 2-e, 3-d, 4-bD) 1-c, 2-e, 3-d, 4-a

    135. Which among these are correct statements

    with reference to IIS application

    1. This application is a VB application that liveson a Web server and responds to requests from

    the browser

    2. It uses HTML to present its user interface anduses compiled VB code to process requests andrespond to events in the browser

    3. To the user, an IIS application appears to bemade up of series of HTML pages4. It bear a superficial resemblance to ASPapplication

    5. This application for Visual Basic developers

    building Web-based application and Web pages

    A) 1, 2, 3, 4, 5

    B) 1, 3, 4, 5C) 2, 3, 4, 5D) 1, 2, 3, 4

    136. Match the following error code with theirmessages

    Set A

    1. 592. 533. 71

    4. 75

    Set B

    a. Path/File access errorb. Path not foundc. Disk not readyd. File not found

    e. Bad record length

    A) 1 e, 2 d, 3 b, 4 aB) 1 d, 2 e, 3 c, 4 b

    C) 1 e, 2 d, 3 c, 4 aD) 1 d, 2 e, 3 b, 4 a

    137. Identify the clipboard methods

    1. SetText2. GetText()3. PutText()4. GetData()

    5. GetFormat()

    6. SetFormat()7. SetData

    A) 2, 3, 4, 5, 6B) 1, 3, 4, 5, 7C) 1, 2, 4, 5, 7D) 1, 2, 3, 4 ,7

    138. Identify the valid code to create Textl.txt &store the contents of the string variable MyString

    & the contents of the numeric variable MyNum

    into the file

    A) FileNum = FreeFile

    Open Textl.txt For Input As FileNumWrite #FileNum, MyString, MyNumClose FileNum

  • 8/13/2019 188840750-Bc0053-Visual-Basic

    17/19

    Visual Basics KARROX COLLEGE OF TECHNOLOGY & MANAGEMENT

    www.karrox.com Helpdesk: 66710528 [email protected]

    Page 17 of 19

    B) FileNum = FreeFile

    Open Textl.txt For Output As FileNum

    Write #FileNum, Mystring. MyNumClose MynumC) FileNum = FreeFile

    Open Textl.txt for Output As FileNumWrite #FileNum, MyString, MynumClose FileNum

    D) File = FreeFileOpen Textl.txt For Input As FileNumWrite #FileNum, MyNumClose MyNum

    139. Relate the following Data Access Objectswith their description

    Set A

    1. Workspace object2. Recordset object

    3. Document object

    4. Property object

    Set B

    a. Represents built in characteristic or a userdefined characteristic of a Data Access Objectb. Corresponds to a cursorred view into a DataAccess Object

    C. Used to support simultaneous transaction & itacts as a container for open databased. Includes information about one instance of

    type of object

    A) 1 b, 2 c, 3 a, 4 d

    B) 1 b, 2 c, 3 d, 4 aC) 1 c, 2 b, 3 a, 4 dD) 1 c, 2 b, 3 d, 4 a

    140. What are the ActiveX controls that are

    available in the Learning edition of Visual Basic

    1. Common dialog

    2. DBGrid3. DBList4. MSFlexGrid5. DBCombo

    6. DBSelect

    A) 1, 2, 3, 4, 5, 6

    B) 1, 3, 4, 5

    C) 1, 2, 3, 4, 5D) 2, 3, 4, 5, 6

    141. State whether the following statement aretrue or false (T/F) with reference to IISapplications

    1. It allows for complicated business processing

    and easy access from almost any browser orplatform2. These are for Visual Basic Developers building

    Web based applications, rather than web pages3. These are intended for use on intranets & aredependent on Internet Explorer 4.0 or later

    4. These use the Active Server Pages objectModel5. These appears to be made up of a series ofHTML pages

    A) 1 F, 2 T, 3 T, 4 F, 5 FB) 1 T, 2 T, 3 T, 4 T, 5 - TC) 1 F, 2 T, 3 F, 4 F, 5 T

    D) 1 T, 2 F, 3 F, 4 T, 5 T

    142. Match the Window style named argument

    constant with their value

    Constant Value

    1 VbHide2 vbNormalFocus3 vbMinimizedFocus4 vbMaximizedFocus

    5 vbNormalNofocus

    i. 0ii. 3

    v. 4iv. 1iii. 2

    A) 1-ii,2-iii, 3-i,4-v, 5-iv

    B) 1-v,2-ii, 3-i,4-iv, 5-iiiC) 1-i,2-iv, 3-iii,4-ii, 5-v

    D) 1-iv,2-iii, -v,4-ii, 5-iv

    143. Which of the following program should beexecuted to print numbers from 5 to 9 on the

    form?i.Dim k As Integer

  • 8/13/2019 188840750-Bc0053-Visual-Basic

    18/19

    Visual Basics KARROX COLLEGE OF TECHNOLOGY & MANAGEMENT

    www.karrox.com Helpdesk: 66710528 [email protected]

    Page 18 of 19

    k=5

    Do White k

  • 8/13/2019 188840750-Bc0053-Visual-Basic

    19/19

    Visual Basics KARROX COLLEGE OF TECHNOLOGY & MANAGEMENT

    www.karrox.com Helpdesk: 66710528 [email protected]

    Page 19 of 19

    148. Which of the following statement is true?

    i. The User control object file has the extension of.DLLii. The graphical elements on the user control is

    stored in the files with Extension .CTXiii. Visual basic has 3 built in functions to trackand report errors at run Time

    iv. The error number of the path not found is 77v. The error number of the disk full is 63

    A) i, ii, iii

    B) i, ii, iii, iv

    C) iii, v, viD) All of the above are false

    149. What is the output of the given codeReDim dArray (1 to 10) as integerDim K as integer

    For K=1 to 10

    dArray(K) = KPrint dArray(K)Next

    ReDim PRESERVE dArray(1 to 5) as integerFor K=1 to 5Print dArray(K)

    Next

    A) output will be number from 1 to 10B) output will be numbers from 1 to 5

    C) output will be numbers from 1 to 9D) No output error in the code

    150. Match the following data type with theirstorage sizesSet A1. Double

    2. Decimal

    3. object4. Variant (with numbers)Set B

    a. 14 bytesb. 8 bytesc. 16 bytes

    d. 4 bytes

    A) 1 b, 2 a, 3 c, 4 dB) 1 a, 2 b, 3 d, 4 c

    C) 1 b, 2 a, 3 d, 4 cD) 1 a, 2 b, 3 c, 4 d