Monday 16 May 2016

Visual Basic .Net




 1.       Which language is not a true object-oriented programming language?
            a.)  VB.NET
b.)  VB 6
c.)  C++
d.)  C#
e.)  Java

Answer:  b                                                                   Level: Easy


 2.       A GUI:
            a.)  uses buttons, menus, and icons.
b.)  should be easy for a user to manipulate.
c.)  stands for Graphic Use Interaction.
d.)  Both a and b.
e.)  All of the above.

Answer:   d                                                                  Level: Moderate


 3.       Visual Studio .NET provides which feature:
            a.)  debugging.
b.)  application deployment.
c.)  syntax checking.
d.)  Both a and b.
e.)  All of the above.

Answer:  e                                                                   Level: Easy


 4.       What does IDE stand for?                                
            a.)  Integrated Development Environment
b.)  Integrated Design Environment
c.)  Interior Development Environment
d.)  Interior Design Environment
e.)  None of the above.

Answer:  a                                                                   Level: Moderate


 5.       Which type of project can a developer choose in the New Project dialog box?
            a.)  Visual Basic Projects
b.)  Visual C# Projects
c.)  Visual C++ Projects
d.)  Both a and b.
e.)  All of the above.

Answer:  e                                                                   Level: Easy


 6.       Which is not a main component of the Visual Studio IDE?
            a.)  Solution Explorer
b.)  Tool Box
c.)  Start Menu
d.)  Designer Window
e.)  Properties Window

Answer:  c                                                                   Level: Easy


 7.       Which does the solution explorer not display?
            a.)  Form Properties
b.)  Reference Folder
c.)  Form File
d.)  Assemble File
e.)  All are part of the solution explorer.

Answer:  a                                                                   Level: Easy


 8.       Which is true about the name and text property of a control?
            a.)  They are the same when the control is first created.
b.)  The text property changes to match any changes in the name property.
c.)  The name property changes to match any changes in the text property.
d.)  They are never the same unless the programmer makes it that way.
e.)  They are not allowed to be the same and an error will occur if they are.

Answer:  a                                                                   Level: Hard


 9.       For which task does the IDE provide multiple ways to accomplish the task?                                
            a.)  Putting a control on the form
b.)  Running the program
c.)  Activating the property window for a control
d.)  Both a and b.
e.)  All of the above.

Answer:  e                                                                   Level: Moderate


 10.       Which are the standard prefixes for the Button and Combo box controls respectively?
            a.)  btn and chb
b.)  btn and cbo
c.)  bto and chb
d.)  bto and cbo
e.)  cmd and cbo

Answer:  b                                                                   Level: Moderate


11.       Which are the standard prefixes for the text box and label controls respectively?
            a.)  tex and lbl
b.)  tex and lab
c.)  txb and lbl
d.)  txb and lab
e.)  txt and lab

Answer:  c                                                                   Level: Moderate

12.       Which task is accomplished in the Code editor?
            a.)  Adding forms to the project
b.)  Adding controls to the form
c.)  Adding event procedures to the form
d.)  Both a and b.
e.)  All of the above.

Answer:  c                                                                   Level: Moderate

13.       Which is not a feature of a GUI that makes learning a program easy for users?
            a.)  Online help
b.)  WYSIWYG formatting
c.)  Dialog boxes
d.)  Detailed key strokes and commands
e.)  Icons
Answer:  d                                                                   Level: Easy


14.       An object is composed of:                                
            a.)  properties.
b.)  methods.
c.)  events.
d.)  Both a and b.
e.)  All of the above.

Answer:   e                                                                  Level: Easy


15.       Which statement about objects is true?
            a.)  One object is used to create one class.
b.)  One class is used to create one object.
c.)  One object can create many classes.
d.)  One class can create many objects.
e.)  There is no relationship between objects and classes.

Answer:  d                                                                   Level: Moderate


16.       Which is not true about forms and controls in Visual Basic?
            a.)  They are pre-built.
b.)  They are graphical objects.
c.)  New versions of the classes must be created with each project.
d.)  Buttons can be created with the drag and drop method.
e.)  All of the above are true.

Answer:  c                                                                   Level: Moderate

17.       Which is an example of Visual Basic Objects?
            a.)  Control objects
b.)  ASP.NET
c.)  ADO.NET
d.)  Both a and b.
e.)  All of the above.

Answer:  e                                                                   Level: Moderate

18.       The .Net class library:
            a.)  contains over 25,000 classes.
b.)  uses namespaces to manage all of the classes.
c.)  has the System.Form namespace for classes used in Windows-based application.
d.)  Both a and b.
e.)  All of the above.

Answer:  d                                                                   Level: Hard


19.       Which is not a property of the Common control class?
            a.)  Show
b.)  BackColor
c.)  Font
d.)  ForeColor
e.)  Name

Answer: a                                                                    Level: Easy


20.       Which property determines whether a control is displayed to the user?
            a.)  Hide
b.)  Show
c.)  Visible
d.)  Enabled
e.)  Cursor

Answer:  c                                                                   Level: Hard


21.       The Button control can be activated:
            a.)  programmatically through the click event.
b.)  by clicking the button with the mouse.
c.)  with the form’s DefaultButton property.
d.)  Both a and b.
e.)  All of the above.

Answer:  d                                                                   Level: Moderate


22.       The CancelButton property belongs to which object?
            a.)  Button
b.)  Form
c.)  Label
d.)  TextBox
e.)  Timer

Answer: b                                                                    Level: Moderate


23.       A click event procedure stud for the label control can be created by:
            a.)  selecting the object and event from the code editor window’s drop-down boxes.
b.)  typing the code in the code editor window.
c.)  by double clicking the control.
d.)  Both a and b.
e.)  All of the above.

Answer:  e                                                                   Level: Moderate


24.       In event-driven programming an event is generated by:                                
            a.)  the system.
b.)  a user’s action.
c.)  the program itself.
d.)  Both a and b.
e.)  All of the above.

Answer:  e                                                                   Level: Moderate


25.       Which is not a common control event?
            a.)  Click
b.)  SingleClick
c.)  DoubleClick
d.)  MouseMove
e.)  MouseDown
 
Answer:  b                                                                   Level: Easy


26.       The Tick event is found only in which object?
a.)  Form
b.)  Button
c.)  TextBox
d.)  Label
e.)  Timer
 
Answer:  e                                                                   Level: Easy

27.       The Activated event is found only in which object?
a.)  Form
b.)  Button
c.)  TextBox
d.)  Label
e.)  Timer
 
Answer:  a                                                                   Level: Easy


28.       The Rnd statement will generate a(n):
a.)  decimal value between 0.01 and 1.00.
b.)  integer value between 0.01 and 1.00.
c.)  decimal value between 0.0 and 1.0.
d.)  integer value between 0.0 and 1.0.
e.)  decimal value between 0.0 and up to 1.0, but not including 1.0.
 
Answer:  e                                                                   Level: Moderate


29.       The analysis phase of software development involves:
a.)  collecting the requirements about what the program will accomplish.
b.)  creating a detailed plan on how the program will accomplish the requirements.
c.)  writing the software with a program such as VB.NET.
d.)  Both a and b.
e.)  All of the above.
 
Answer:  a                                                                   Level: Moderate


30.       Which phase of project development typically costs the most?
a.)  Analysis
b.)  Design
c.)  Implementation
d.)  Maintenance
e.)  Documentation

Answer:  d                                                                   Level: Easy


31.       Which Do…Loop statement should be used to process test scores where a test score over 100 is a signal to stop the processing?
            a.)  Do While Score > 100
b.)  Do Until Score > 100
c.)  Loop While Score > 100
d.)  Loop Until Score > 100
e.)  All of the above are valid for this situation.

Answer:  b                                                                   Level: Hard

32.       In the For…Next statement the default value for the Step is:
            a.)  -1
b.)  0
c.)  1
d.)  2
e.)  There is no default for the step value.

Answer:  c                                                                   Level: Easy

33.       The For…Next Loop is used when:
            a.)  a choice is made based on a Boolean condition.
b.)  a block of statements is executed an unknown number of times.
c.)  a block of statements is executed a known number of times.
d.)  Both a and b.
e.)  All of the above.

Answer:  c                                                                   Level: Easy

34.       The advantage of For…Next loops over Do…Loops is that they are:
            a.)  easier to read and maintain.
b.)  less prone to being infinite loops.
c.)  good for working with arrays.
d.)  Both a and b.
e.)  All of the above.

Answer:  e                                                                   Level: Moderate

35.       Which is not a valid Exit statement?                                
            a.)  Exit Do
b.)  Exit For
c.)  Exit Form
d.)  Exit Select
e.)  Exit Sub

Answer:  c                                                                   Level: Moderate

36.       A sentinel value:
            a.)  is used to prevent infinite loops.
b.)  must be a negative value.
c.)  signals the end of a list of data.
d.)  Both a and b.
e.)  All of the above.

Answer:  c                                                                   Level: Easy

37.       Which function should be used to validate that input is not a string before performing arithmetic operations?
            a.)  IsArithmetic
b.)  IsNotString
c.)  IsNumeric
d.)  IsString
e.)  IsValue

Answer:  c                                                                   Level: Moderate

38.       Which is not a type of error programmers look for?
            a.)  Logic
b.)  Runtime
c.)  Superficial
d.)  Syntax
e.)  All are errors programmers look for.

Answer:  c                                                                   Level: Easy

39.       Which action will raise an exception?
            a.)  Dividing by zero.
b.)  Assigning the string “Hi” to an integer variable.
c.)  Accessing an empty CD drive.
d.)  Both a and b.
e.)  All of the above.

Answer:  e                                                                   Level: Easy

40.       An Exception is another name for a:                                 
            a.)  compile error.
b.)  logic error.
c.)  runtime error.
d.)  superficial error.
e.)  syntax error.

Answer:  c                                                                   Level: Moderate

41.       What is the most number of states a CheckBox can have?
            a.)  0
b.)  1
c.)  2
d.)  3
e.)  4
Answer: d                                                                    Level: Moderate

42.       What is the standard prefix for the name of a CheckBox?
            a.)  chb
b.)  chk
c.)  ckb
d.)  ckx
e.)  cbx

Answer: b                                                                    Level: Easy

43.       A CheckBox can also appear as a(n):
            a.)  button.
b.)  RadioButton.
c.)  ScrollBar.
d.)  Both a and b.
e.)  All of the above.

Answer:  a                                                                   Level: Easy
                                                                                       
44.       What is the standard prefix for the name of a RadioButton?
            a.)  rad
b.)  rab
c.)  rdo
d.)  rdb
e.)  rbt

Answer: a                                                                    Level: Easy

45       How many RadioButtons in a Group Box can be selected at the same time?                                 
            a.)  0
b.)  1
c.)  2
d.)  3
e.)  4

Answer:  b                                                                   Level: Easy

46.       Which event is activated when a RadioButton is selected?
            a.)  Checked
b.)  CheckedChanged
c.)  Selected
d.)  SelectedChanged
e.)  SelectionChanged

Answer:  b                                                                   Level: Moderate


Multiple Choice Questions Set  2

 1.       Which is not an integer data type?
            a.)  Single
b.)  Byte
c.)  Short
d.)  Integer
e.)  Long

Answer:  a                                                                   Level: Moderate


 2.       Which is a numeric data type?
            a.)  Floating point
b.)  Integer
c.)  Boolean
d.)  Both a and b.
e.)  All of the above.

Answer:  d                                                                   Level: Moderate


 3.       Which sequence of char data types is listed from lowest to highest?
            a.)  a, A, z, Z
b.)  a, z, A, Z
c.)  A, a, Z, z
d.)  A, Z, a, z
e.)  z, a, Z, A

Answer:  d                                                                   Level: Moderate

 4.       The Date data type does not hold which type of information.
            a.)  Seconds
b.)  Hours
c.)  Days
d.)  Months
e.)  Quarters

Answer:  e                                                                   Level: Easy


 5.       The Boolean data type:
            a.)  is unsigned.
b.)  has two states.
c.)  is displayed by the program as yes or no.
d.)  Both a and b.
e.)  All of the above.

Answer:  d                                                                   Level: Moderate


 6.       Which is a valid statement for declaring a variable?
            a.)  Const Form As Integer
b.)  Const myForm As Integer
c.)  Dim Form As Integer
d.)  Dim myForm As Integer
e.)  All of the above.

Answer:  d                                                                   Level: Moderate

 7.       VB.Net identifiers:
            a.)  are case sensitive.
b.)  can begin with an underscore.
c.)  can begin with a number.
d.)  Both a and b.
e.)  All of the above.

Answer: b                                                                    Level: Moderate


 8.       The name of a constant:
            a.)  must both begin with a letter and be all upper case.
b.)  does not have to begin with a letter but must be all upper case.
c.)  must begin with a letter but can be upper or lower case.
d.)  does not have to begin with a letter and be either upper or lower case.
e.)  None of the above.

Answer:  d                                                                   Level: Moderate


 9.       The proper operator precedence, from first to last, is:
            a.)  logical, comparison, and arithmetic.
b.)  arithmetic, comparison, and logical.
c.)  arithmetic, logical, and comparison.
d.)  comparison, arithmetic, and logical.
e.)  logical, arithmetic, comparison.

Answer:  b                                                                   Level: Moderate


10.       With A = False and B = True, which statement evaluates as True?
            a.)  A AND A
b.)  A AND B
c.)  B AND A
d.)  B AND B
e.)  None are true.

Answer:  d                                                                   Level: Easy

11.       With A = False and B = True, which statement evaluates as False?
            a.)  A OR A
b.)  A OR B
c.)  B OR A
d.)  B OR B
e.)  None are true.

Answer:  a                                                                   Level: Easy


12.       Which operator is evaluated first?
            a.)  NOT
b.)  AND
c.)  XOR
d.)  OR
e.)  They are always evaluated left-to-right.

Answer:  a                                                                   Level: Moderate


13.       The left side of an assignment statement will hold:
            a.)  a variable.
b.)  an object property.
c.)  an expression.
d.)  Both a and b.
e.)  All of the above.

Answer:  d                                                                   Level: Easy


14.       The right side of an assignment statement will hold:
            a.)  a variable.
b.)  an object property.
c.)  an expression.
d.)  Both a and b.
e.)  All of the above.

Answer:  c                                                                   Level: Easy


15.       Which function will return the monthly payments of a loan?
            a.)  Pay (Rate, PV, Nper)
b.)  Pmt (Rate, Nper, PV)
c.)  FV (Rate, Nper, Pmt)
d.)  FV (Rate, Nper, PV)
e.)  None of the above.

Answer:  b                                                                   Level: Easy


16.       Which function returns the numbers represented in the string “$56.7”?
            a.)  Abs
b.)  CDbl
c.)  Int
d.)  Rnd
e.)  Val

Answer:  b                                                                   Level: Moderate


17.       What will the function Val ($165.30) return?
            a.)  0
b.)  165
c.)  165.30
d.)  $165.30
e.)  An error

Answer:  a                                                                   Level: Easy


18.       Which function displays a pop-up window?
            a.)  MsgBox
b.)  InputBox
c.)  TextBox
d.)  Both a and b.
e.)  All of the above.

Answer:  d                                                                   Level: Easy


19.       Which is true about the prompt argument?                                
            a.)  It can be made of multiple values concatenated into one string.
b.)  It can include the vbCrLf constant.
c.)  It can include the ampersand symbol to concatenate strings.
d.)  Both a and b.
e.)  All of the above.

Answer:  e                                                                   Level: Easy


20.       In order to process a number typed in a TextBox the programmer must:
            a.)  use the Val function to convert the Text value.
b.)  use the CDbl function to convert the Text value.
c.)  use the IsNumeric function to convert the Text value.
d.)  Both a and b.
e.)  All of the above.

Answer:  d                                                                   Level: Moderate


21.       Which TextBox method does not use the clipboard?
            a.)  Clear
b.)  Copy
c.)  Cut
d.)  Paste
e.)  All of these methods use the clipboard.

Answer:  a                                                                   Level: Easy


22.       Which TextBox property should always be changed first?
            a.)  AcceptsReturn
b.)  BorderStyle
c.)  Font
d.)  Name
e.)  Text

Answer: d                                                                    Level: Moderate


23.       Which is not a valid value for the ListBox SectionMode Property?
            a.)  None
b.)  One
c.)  MultiSimple
d.)  MultiExtended
e.)  All of the above.

Answer:  e                                                                   Level: Moderate


24.       Setting the SelectedIndex property of a ListBox to -1 will:                                 
            a.)  cause an error.
b.)  cannot be done.
c.)  de-select any selected item.
d.)  Both a and b.
e.)  All of the above.

Answer:  c                                                                   Level: Hard


25.       Which method of a ListBox will remove just one item at a time?
            a.)  Items.RemoveAt
b.)  Item.RemoveAt
c.)  Items.ClearAt
d.)  Item.ClearAt
e.)  Items.Clear
 
Answer:  a                                                                   Level: Moderate


26.       The Items property of a ComboBox:
            a.)  is a collection of items.
b.)  is the same as the Items property of a ListBox.
c.)  contains methods and properties.
d.)  Both a and b.
e.)  All of the above.

Answer:  e                                                                   Level: Moderate


27.       Which value for the ComboBox DropDownStyle property allows a user to type in data?
            a.)  DropDown
b.)  DropDownSimple
c.)  DropDownList
d.)  Both a and b.
e.)  All of the above.

Answer:  a                                                                   Level: Moderate

28.       Which two controls combined to form the ComboBox control?
            a.)  ListBox and TextBox
b.)  ListBox and InputBox
c.)  ListBox and MsgBox
d.)  Label and TextBox
e.)  Label and InputBox



Answer:  a                                                                   Level: Easy
29.       Which is the appropriate prefix for a DataAdapter object?
            a.)  da
b.)  daa
c.)  dad
d.)  dt
e.)  dta

Answer:  a                                                                   Level: Easy
Section:  11-3                                                              Page: 300

30..       Which type of object has the Generate Dataset method?
            a.)  Adapter object
b.)  Connection object
c.)  Database object
d.)  Dataset object
e.)  None of the above.

Answer:  a                                                                   Level: Moderate
Section:  11-3                                                              Page: 300

.31.       Which is the appropriate prefix for a Dataset object?                                 
            a.)  da
b.)  das
c.)  dat
d.)  ds
e.)  dst

Answer: d                                                                    Level: Easy
Section: 11-3                                                               Page: 300

32.       Which object does the data-aware control bind to?
            a.)  Dataset
b.)  DataAdapter
c.)  Connection
d.)  Both a and b.
e.)  All of the above.

Answer:  a                                                                   Level: Easy
Section: 11-4                                                               Page: 300

33.       What is the proper code to put data into the dataset called CustomerDataset using the CustomerDataAdapter object?
            a.)  CustomerDataset.Fill(CustomerDataAdapter)
b.)  CustomerDataAdapter.Fill(CustomerDataset)
c.)  CustomerDataset.Load(CustomerDataAdapter)
d.)  CustomerDataAdapter.Load(CustomerDataset)
e.)  None of the above.

Answer: b                                                                    Level: Moderate
Section: 11-4                                                               Page: 303

34.       Which object contains the Position property of the current record in a dataset?
            a.)  BindingContext
b.)  BindingData
c.)  DataBinding
d.)  DataBound
e.)  DataContext

Answer:  a                                                                   Level: Moderate
Section: 11-4                                                               Page: 303

35.       The first record in a dataset has a position property of:
            a.)  zero.
b.)  one.
c.)  any value defined by the programmer.
d.)  Both a and b.
e.)  All of the above.

Answer:  a                                                                   Level: Easy
Section:  11-4                                                              Page: 303

36.       Which below is specified by the DataMember Property?
            a.)  Connection object
b.)  DataAdapter object
c.)  Database field
d.)  Database table
e.)  Dataset object

Answer: d                                                                    Level: Moderate
Section: 11-5                                                               Page: 305

37.       Which below is specified by the DataSource Property?
            a.)  Connection object
b.)  DataAdapter object
c.)  Database field
d.)  Database table
e.)  Dataset object

Answer:  e                                                                   Level: Moderate
Section: 11-5                                                               Page: 305

38.       Which is a property of the DataGrid control?
            a.)  DataMember
b.)  DataSource
c.)  DataQuery
d.)  Both a and b.
e.)  All of the above.

Answer:  d                                                                   Level: Easy

Section:  11-5                                                              Page: 305

39.       Which type of file can be played with the Windows Media Player control?
            a.)  MPEG
b.)  AVI
c.)  WAV
d.)  Both a and b.
e.)  All of the above.

Answer:  e                                                                   Level: Easy

40.       The Windows Media Player control:
            a.)  is located in the toolbox by default.
b.)  is located in the toolbar.
c.)  can be added to the toolbar.
d.)  Both a and b.
e.)  All of the above.

Answer:  c                                                                   Level: Moderate

41.       The Windows Media Player control can:                                
            a.)  display video output.
b.)  create audio output.
c.)  generate tactile output.
d.)  Both a and b.
e.)  All of the above.

Answer:  d                                                                   Level: Moderate

42.       Which Windows Media Player control property will hide the player from user's view?
            a.)  Anchor
b.)  FileName
c.)  Location
d.)  ShowControl
e.)  Visible

Answer:  e                                                                   Level: Moderate

 43.       When a condition in an If…Then statements tests true:
            a.)  the next Else statement is activated.
b.)  the next If statement is activated.
c.)  the next Then statement is activated.
d.)  the End If statement is activated.
e.)  a condition can never test true.

Answer:  c                                                                   Level: Moderate

44.       The End If statement is required:
            a.)  in all If…Then statements.
b.)  in all Multi-line statements with Else.
c.)  in Single Line statements.
d.)  Both a and b.
e.)  All of the above.

Answer:   b                                                                  Level: Moderate

45.       Which statements are optional in an If…Then statement?
            a.)  If
b.)  Then
c.)  Else
d.)  Both a and b.
e.)  All of the above.

Answer:  c                                                                   Level: Easy

46      Which selection process is an example of multiple branches from a single expression?                                
            a.)  If…Then
b.)  Select Case
c.)  Do…Loop
d.)  For…Next
e.)  All of the above.

Answer:  b                                                                   Level: Hard

 47.       How many times is the test expression of a Select Case evaluated?
            a.)  0
b.)  1
c.)  2
d.)  Once for each Case.
e.)  It depends on the value of the test expression.

Answer:  b                                                                   Level: Moderate

48.       Which is not a type of Select Case test construct?
            a.)  simple value
b.)  complex value
c.)  relational value with Is
d.)  range of values with To
e.)  All of the above are types of test constructs.

Answer:  b                                                                   Level: Hard

49.       What happens in a Select Case construct when a test value matches the test expression?
            a.)  The corresponding block of statements is run.
b.)  The next Case test value is checked.
c.)  The Case Else statement is run.
d.)  The Select Case construct is exited.
e.)  An error is generated.

Answer:  a                                                                   Level: Moderate

50.       Do...Loop is an iterative statement because it:
            a.)  selects a block of statements to run.
b.)  runs the same block of statements repeatedly.
c.)  selects a block of statements and runs it repeatedly.
d.)  selects a block of statements and runs it a specified number of times.
e.)  All of the above.

Answer:  b                                                                   Level: Hard
                                                                                                            
52.       Which is true of a Do…Loop?                                  
            a.)  The While condition goes after the Do keyword.
b.)  The Until condition goes after the Do keyword.
c.)  The While condition goes after the Loop keyword.
d.)  The Until condition goes after the Loop keyword.
e.)  All of the above.

Answer:  e                                                                   Level: Easy






Multiple Choice Questions Set  3 Visual Basic .Net  
Multiple Choice Questions
 1.       Which is a type of procedure found in VB.Net?
            a.)  Event
b.)  Function
c.)  Sub
d.)  Both a and b.
e.)  All of the above.

Answer:  e                                                                   Level: Easy

 2.       The methodology where code is broken into small, logical procedures is called:
            a.)  event-driven programming.
b.)  functional programming.
c.)  granular programming.
d.)  modular programming.
e.)  procedural programming.

Answer:  d                                                                   Level: Hard

 3.       When using a procedure the calling code sends data via the:
            a.)  actual argument to the formal parameter of the procedure.
b.)  formal argument to the actual parameter of the procedure.
c.)  actual parameter to the formal argument of the procedure.
d.)  formal parameter to the actual argument of the procedure.
e.)  All of the above.

Answer:  a                                                                   Level: Hard
  
 4.       From how many places in the code can a procedure be called?                                
            a.)  0
b.)  1
c.)  2
d.)  3
e.)  As many times as needed.

Answer: e                                                                    Level: Easy

 5.       Which parameter is found in an event procedure?
            a.)  e
b.)  Sender
c.)  Receiver
d.)  Both a and b.
e.)  All of the above.

Answer: e                                                                    Level: Moderate

 6.       Which is an optional element of an event procedure?
            a.)  End Sub
b.)  Handles
c.)  Object_Event
d.)  Statements
e.)  Sub

Answer: d                                                                    Level: Moderate

 7.       What happens when a parameter in a procedure is declared ByVal?
            a.)  Only arguments of numeric data types are allowed.
b.)  A reference to the argument is sent to the procedure.
c.)  A copy of the argument is sent to the procedure.
d.)  Both a and b.
e.)  All of the above.

Answer:  c                                                                   Level: Easy

 8.       Which is a valid way to write the procedure stub for an object’s default event?
            a.)  Use the Class and Method combo boxes in the Code Editor window.
b.)  Double click on the object in the Form Designer window.
c.)  Type the procedure declaration in the Code Editor window.
d.)  Both a and b.
e.)  All of the above.

Answer: e                                                                    Level: Moderate

 9.       A sub procedure is valuable because it:                                 
            a.)  makes code easier to maintain.
b.)  splits the logic to solve a problem into small, manageable units.
c.)  limits the number of times the code can be accessed.
d.)  Both a and b.
e.)  All of the above.

Answer:  d                                                                   Level: Moderate

 10.       Which is not an optional element of a sub procedure declaration?
            a.)  Parameters
b.)  Public
c.)  Private
d.)  Statements
e.)  Sub

Answer: e                                                                    Level: Moderate

11.       Which is a valid way to write a sub procedure declaration?
            a.)  Use the Class and Method combo boxes in the Code Editor window.
b.)  Double click on the object in the Form Designer window.
c.)  Type the procedure declaration in the Code Editor window.
d.)  Both a and b.
e.)  All of the above.

Answer: c                                                                    Level: Moderate

  
12.       Which statement will send the value generated by a function procedure, called CalculateTax, back to the calling code?
            a.)  Return Sales*0.08
b.)  CalculateTax = Sales*0.08
c.)  Return CalculateTax (Sales*0.08)
d.)  Both a and b.
e.)  All of the above.

Answer:  d                                                                   Level: Moderate

13.       Which part of a function procedure declaration statement is optional?
            a.)  Datatype
b.)  Function
c.)  Parameters
d.)  Private
e.)  ProcedureName

Answer:  c                                                                   Level: Hard

14.       How many return statements are allowed in a Function Procedure?                                
            a.)  0
b.)  1
c.)  2
d.)  3
e.)  There is no limit.

Answer:  e                                                                   Level: Easy

15.       Why should a variable not be declared as a module variable?
            a.)  It prevents a procedure from being self contained.
b.)  It makes it easier to document the code.
c.)  Local variable names can be reused in other procedures.
d.)  Both a and b.
e.)  All of the above.

Answer:  e                                                                   Level: Moderate

16.       Which variable name uses a standard naming convention for module variables?
            a.)  mWeight
b.)  mdWeight
c.)  modWeight
d.)  moduleWeight
e.)  module_Weight

Answer:  a                                                                   Level: Easy

17.       The scope of a variable refers to:
            a.)  the length of the variable.
b.)  the name of the variable.
c.)  the accessibility of the variable.
d.)  the datatype of the variable.
e.)  the lifetime of the variable.

Answer: c                                                                    Level: Moderate

18.       What is the value of the index for the first element in a VB.NET array?
            a.)  0
b.)  1
c.)  2
d.)  3
e.)  Depends on what the assigned value is.

Answer:  a                                                                   Level: Moderate

19.       Which method will return the number of elements in an array?                                 
            a.)  Dimension
b.)  Length
c.)  Number
d.)  Size
e.)  UpperBound

Answer:  b                                                                   Level: Moderate

20.       In the statement, Dim Days(7) as String, what part of the array does the number 7 refer to?
            a.)  Array name
b.)  Datatype
c.)  Lowerbound
d.)  Upperbound
e.)  Size

Answer:  d                                                                   Level: Moderate

21.       What is required to reference an element in an array?
            a.)  Array name
b.)  Index value of the element
c.)  Element value
d.)  Both a and b.
e.)  All of the above.

Answer:  d                                                                   Level: Moderate

22.       Which method will arrange the elements of an array in alphabetical order?
            a.)  Arrange
b.)  Assemble
c.)  Order
d.)  Rank
e.)  Sort

Answer:  e                                                                   Level: Easy

23.       The number of variables allowed in a structured is:
            a.)  0
b.)  1
c.)  2
d.)  3
e.)  Any number of variables can be declared in an array.

Answer: e                                                                    Level: Easy

24.       The variable inside a structure is called a(n):                                
            a.)  associate.
b.)  constituent.
c.)  element.
d.)  member.
e.)  part.

Answer: d                                                                    Level: Moderate

25.       Which datatype can an array not hold?
            a.)  TextBoxes
b.)  Labels
c.)  Structures
d.)  Controls
e.)  An array can hold all of the above.

Answer:  e                                                                   Level: Easy

26.       An array of controls can be populated by:
            a.)  assigning existing controls to the array.
b.)  creating controls and assigning them to the array.
c.)  borrowing controls that will automatically assign them to the array.
d.)  Both a and b.
e.)  All of the above.

Answer:  d                                                                   Level: Moderate

27.       The Tag property can:
            a.)  only hold string values.
b.)  only hold integer values.
c.)  only hold Boolean values.
d.)  only hold controls.
e.)  hold any data defined by the programmer.

Answer: e                                                                    Level: Hard

28.       The KeyPress event will capture pressing the key:                                
            a.)  A.
b.)  shift.
c.)  control.
d.)  Both a and b.
e.)  All of the above.

Answer:  a                                                                   Level: Easy

29.       Which argument in the KeyPress parameter list contains the Handled property?
            a.)  Sender
b.)  e
c.)  Object
d.)  KeyPressEventArgs
e.)  None of the above.

Answer: b                                                                    Level: Hard


30.       Where is a single element of data stored?
            a.)  Field
b.)  Record
c.)  Table
d.)  Both a and b.
e.)  All of the above.

Answer:  a                                                                   Level: Easy

31.       Where is a collection of related data elements stored?
            a.)  Field
b.)  Record
c.)  Table
d.)  Both a and b.
e.)  All of the above.

Answer:   b                                                                  Level: Easy

32.       Which is true about the primary key?
            a.)  Every table should have a primary key.
b.)  A primary key exclusively identifies each row in a table.
c.)  A primary key can be made of multiple fields.
d.)  Both a and b.
e.)  All of the above.

Answer:  e                                                                   Level: Moderate

33.       A foreign key:                                  
            a.)  has nothing to do with the primary key.
b.)  has different values than the primary key.
c.)  is found in tables that don’t have a primary key.
d.)  is related to the primary key of a different table.
e.)  is a unique record in a table.

Answer:  d                                                                   Level: Hard

34.       Which is not a program that can create a database?
            a.)  Access
b.)  MySQL
c.)  Oracle
d.)  SQL Server
e.)  All of the above can be used to create a database.

Answer:  e                                                                   Level: Easy

35.       What does the term DBMS stand for?
            a.)  Database Management Schema
b.)  Database Management Style
c.)  Database Management System
d.)  Database Manipulation Schema
e.)  Database Manipulation Style

Answer:  c                                                                   Level: Moderate

36.       The normalization process is:
            a.)  used to remove redundant data.
b.)  used to make the storage of data more efficient.
c.)  not recommended for most databases.
d.)  Both a and b.
e.)  All of the above.

Answer:  d                                                                   Level: Hard

37.       Which clause is required in an SQL query for getting information from a database?
            a.)  JOIN
b.)  ON
c.)  ORDER BY
d.)  SELECT
e.)  WHERE

Answer:  d                                                                   Level: Moderate

38.       How many fields can be specified in the SELECT clause?                                 
            a.)  0
b.)  1
c.)  2
d.)  3
e.)  As many as needed.

Answer: e                                                                    Level: Moderate
  
39.       How many records are specified in the SELECT clause?
            a.)  0
b.)  1
c.)  2
d.)  3
e.)  As many as needed.

Answer:  a                                                                   Level: Hard

40.       Which is the wildcard symbol for selecting all the fields in a table? 
            a.)  @
b.)  #
c.)  ^
d.)  *
e.)  +

Answer:  d                                                                   Level: Easy

41.       The WHERE clause is used to restrict the number of ____ retrieved by an SQL statement.
            a.)  fields
b.)  records
c.)  tables
d.)  Both a and b.
e.)  All of the above.

Answer:  b                                                                   Level: Easy

 42.       Which is not a valid type of JOIN?
            a.)  LEFT JOIN
b.)  MIDDLE JOIN
c.)  RIGHT JOIN
d.)  INNER JOIN
e.)  All of the above are valid types.

Answer:  b                                                                   Level: Moderate

43.       The ORDER BY clause is used to sort:                                
            a.)  fields.
b.)  records.
c.)  tables.
d.)  Both a and b.
e.)  All of the above.

Answer:  b                                                                   Level: Moderate

44.       Which database is the ADO.NET SqlConnection object designed for?
            a.)  Access
b.)  Microsoft SQL Server
c.)  MySQL
d.)  Oracle
e.)  None of the above.

Answer:  b                                                                   Level: Easy

45.       Which property of the database must the connection object contain?
            a.)  Location
b.)  Type
c.)  Query
d.)  Both a and b.
e.)  All of the above.

Answer:  d                                                                   Level: Moderate

46       Which is not a tab on the DataLink Property window?
            a.)  Advanced
b.)  All
c.)  Adapter
d.)  Connection
e.)  Provider

Answer:  c                                                                   Level: Hard

47.       What information is specified in the Connection tab of the DataLink window?
            a.)  Database login
b.)  Database name
c.)  Database type
d.)  Both a and b.
e.)  All of the above.

Answer:  d                                                                   Level: Hard

48.       The first step of configuring a DataAdapter is to select:                                
            a.)  an adapter object.
b.)  a connection object.
c.)  a database object.
d.)  a dataset object.
e.)  None of the above.

Answer:  b                                                                   Level: Moderate

49.       Which DataAdapter Query Type can be used with the Access database?
            a.)  Use SQL statements.
b.)  Create new stored procedure.
c.)  Use existing stored procedure.
d.)  Both a and b.
e.)  All of the above.

Answer:  a                                                                   Level: Easy

50.       Which is not an ADO.NET DataAdapter Object?
            a.)  OleDbDataAdapter
b.)  SQLDataAdapter
c.)  QueryDataAdapter
d.)  Both a and b.
e.)  All of the above.

Answer: c                                                                    Level: Easy



Multiple Choice Questions
 1.       Which is a type of procedure found in VB.Net?
            a.)  Event
b.)  Function
c.)  Sub
d.)  Both a and b.
e.)  All of the above.

Answer:  e                                                                   Level: Easy

  2.       The methodology where code is broken into small, logical procedures is called:
            a.)  event-driven programming.
b.)  functional programming.
c.)  granular programming.
d.)  modular programming.
e.)  procedural programming.

Answer:  d                                                                   Level: Hard

  3.       When using a procedure the calling code sends data via the:
            a.)  actual argument to the formal parameter of the procedure.
b.)  formal argument to the actual parameter of the procedure.
c.)  actual parameter to the formal argument of the procedure.
d.)  formal parameter to the actual argument of the procedure.
e.)  All of the above.

Answer:  a                                                                   Level: Hard

 4.       From how many places in the code can a procedure be called?                                
            a.)  0
b.)  1
c.)  2
d.)  3
e.)  As many times as needed.

Answer: e                                                                    Level: Easy

 5.       Which parameter is found in an event procedure?
            a.)  e
b.)  Sender
c.)  Receiver
d.)  Both a and b.
e.)  All of the above.

Answer: e                                                                    Level: Moderate
  
 6.       Which is an optional element of an event procedure?
            a.)  End Sub
b.)  Handles
c.)  Object_Event
d.)  Statements
e.)  Sub

Answer: d                                                                    Level: Moderate

 7.       What happens when a parameter in a procedure is declared ByVal?
            a.)  Only arguments of numeric data types are allowed.
b.)  A reference to the argument is sent to the procedure.
c.)  A copy of the argument is sent to the procedure.
d.)  Both a and b.
e.)  All of the above.

Answer:  c                                                                   Level: Easy

 8.       Which is a valid way to write the procedure stub for an object’s default event?
            a.)  Use the Class and Method combo boxes in the Code Editor window.
b.)  Double click on the object in the Form Designer window.
c.)  Type the procedure declaration in the Code Editor window.
d.)  Both a and b.
e.)  All of the above.

Answer: e                                                                    Level: Moderate

 9.       A sub procedure is valuable because it:                                 
            a.)  makes code easier to maintain.
b.)  splits the logic to solve a problem into small, manageable units.
c.)  limits the number of times the code can be accessed.
d.)  Both a and b.
e.)  All of the above.

Answer:  d                                                                   Level: Moderate

10.       Which is not an optional element of a sub procedure declaration?
            a.)  Parameters
b.)  Public
c.)  Private
d.)  Statements
e.)  Sub

Answer: e                                                                    Level: Moderate

11.       Which is a valid way to write a sub procedure declaration?
            a.)  Use the Class and Method combo boxes in the Code Editor window.
b.)  Double click on the object in the Form Designer window.
c.)  Type the procedure declaration in the Code Editor window.
d.)  Both a and b.
e.)  All of the above.

Answer: c                                                                    Level: Moderate

12.       Which statement will send the value generated by a function procedure, called CalculateTax, back to the calling code?
            a.)  Return Sales*0.08
b.)  CalculateTax = Sales*0.08
c.)  Return CalculateTax (Sales*0.08)
d.)  Both a and b.
e.)  All of the above.

Answer:  d                                                                   Level: Moderate

13.       Which part of a function procedure declaration statement is optional?
            a.)  Datatype
b.)  Function
c.)  Parameters
d.)  Private
e.)  ProcedureName

Answer:  c                                                                   Level: Hard

14.       How many return statements are allowed in a Function Procedure?                                
            a.)  0
b.)  1
c.)  2
d.)  3
e.)  There is no limit.

Answer:  e                                                                   Level: Easy

15.       Why should a variable not be declared as a module variable?
            a.)  It prevents a procedure from being self contained.
b.)  It makes it easier to document the code.
c.)  Local variable names can be reused in other procedures.
d.)  Both a and b.
e.)  All of the above.

Answer:  e                                                                   Level: Moderate

16.       Which variable name uses a standard naming convention for module variables?
            a.)  mWeight
b.)  mdWeight
c.)  modWeight
d.)  moduleWeight
e.)  module_Weight

Answer:  a                                                                   Level: Easy

17.       The scope of a variable refers to:
            a.)  the length of the variable.
b.)  the name of the variable.
c.)  the accessibility of the variable.
d.)  the datatype of the variable.
e.)  the lifetime of the variable.

Answer: c                                                                    Level: Moderate

18.       What is the value of the index for the first element in a VB.NET array?
            a.)  0
b.)  1
c.)  2
d.)  3
e.)  Depends on what the assigned value is.

Answer:  a                                                                   Level: Moderate

19.       Which method will return the number of elements in an array?                                 
            a.)  Dimension
b.)  Length
c.)  Number
d.)  Size
e.)  UpperBound

Answer:  b                                                                   Level: Moderate

20.       In the statement, Dim Days(7) as String, what part of the array does the number 7 refer to?
            a.)  Array name
b.)  Datatype
c.)  Lowerbound
d.)  Upperbound
e.)  Size

Answer:  d                                                                   Level: Moderate

21.       What is required to reference an element in an array?
            a.)  Array name
b.)  Index value of the element
c.)  Element value
d.)  Both a and b.
e.)  All of the above.

Answer:  d                                                                   Level: Moderate

22.       Which method will arrange the elements of an array in alphabetical order?
            a.)  Arrange
b.)  Assemble
c.)  Order
d.)  Rank
e.)  Sort

Answer:  e                                                                   Level: Easy

23.       The number of variables allowed in a structured is:
            a.)  0
b.)  1
c.)  2
d.)  3
e.)  Any number of variables can be declared in an array.

Answer: e                                                                    Level: Easy

24.       The variable inside a structure is called a(n):                                
            a.)  associate.
b.)  constituent.
c.)  element.
d.)  member.
e.)  part.

Answer: d                                                                    Level: Moderate

25.       Which datatype can an array not hold?
            a.)  TextBoxes
b.)  Labels
c.)  Structures
d.)  Controls
e.)  An array can hold all of the above.

Answer:  e                                                                   Level: Easy

26.       An array of controls can be populated by:
            a.)  assigning existing controls to the array.
b.)  creating controls and assigning them to the array.
c.)  borrowing controls that will automatically assign them to the array.
d.)  Both a and b.
e.)  All of the above.

Answer:  d                                                                   Level: Moderate

27.       The Tag property can:
            a.)  only hold string values.
b.)  only hold integer values.
c.)  only hold Boolean values.
d.)  only hold controls.
e.)  hold any data defined by the programmer.

Answer: e                                                                    Level: Hard

28.       The KeyPress event will capture pressing the key:                                
            a.)  A.
b.)  shift.
c.)  control.
d.)  Both a and b.
e.)  All of the above.

Answer:  a                                                                   Level: Easy
  
29.       Which argument in the KeyPress parameter list contains the Handled property?
            a.)  Sender
b.)  e
c.)  Object
d.)  KeyPressEventArgs
e.)  None of the above.

Answer: b                                                                    Level: Hard

30.       Which menu item is not typically found in the File Menu?
            a.)  Close
b.)  Copy
c.)  Exit
d.)  Print
e.)  Save

Answer: b                                                                    Level: Easy

31.       What is the name of the control for putting menus on a form?
            a.)  FormMenu
b.)  MenuForm
c.)  MenuControl
d.)  MainMenu
e.)  Menu

Answer:                                                                   Level: Easy

32.       The standard prefix for a menu item is:
            a.)  men.
b.)  meu.
c.)  mit.
d.)  mni.
e.)  mnu.

Answer: e                                                                    Level: Easy

33.       Which menu object property places a check mark in the display of the menu text?                                
            a.)  Check
b.)  Checked
c.)  CheckMark
d.)  CheckOn
e.)  RadioCheck

Answer: b                                                                    Level: Moderate

34.       Which symbol creates an access key in the text of a menu item?
            a.)  @
b.)  #
c.)  $
d.)  %
e.)  &

Answer:  e                                                                   Level: Moderate

35.       Which is not a standard dialog box?
            a.)  ColorDialog
b.)  FontDialog
c.)  OpenDialog
d.)  PrintDialog
e.)  ZoomDialog

Answer: e                                                                    Level: Easy
  
36.       Why are standard dialog boxes used?
            a.)  They are easy to create.
b.)  They provide functionality familiar to users.
c.)  Developers can create their own versions of Dialog boxes.
d.)  Both a and b.
e.)  All of the above.

Answer: d                                                                    Level: Moderate

37.       How are dialog boxes implemented in a program?
            a.)  A dialog box is generated programmatically.
b.)  A dialog control is placed in the component tray.
c.)  A dialog control is placed on the form.
d.)  Both a and b.
e.)  All of the above.

Answer: d                                                                    Level: Moderate

38.       The standard prefix for a dialog control is:
            a.)  dal.
b.)  dia.
c.)  dil.
d.)  dlc.
e.)  dlg.

Answer:  e                                                                   Level: Easy

39.       What is the method used to activate the color dialog box?
            a.)  ActivateDialog
b.)  DisplayDialog
c.)  ExhibitDialog
d.)  ShowDialog
e.)  StartDialog

Answer:  d                                                                   Level: Moderate

40.       The name of the class used to programmatically create a color dialog box is:
            a.)  Color
b.)  ColorBox
c.)  ColorDialog
d.)  ColorDisplay
e.)  ColorDisplayBox

Answer: c                                                                    Level: Moderate

41.       The name of the class used to programmatically create a font dialog box is:
            a.)  Font.
b.)  FontBox.
c.)  FontDialog.
d.)  FontDisplay.
e.)  FontDialogBox.

Answer:  c                                                                   Level: Moderate

42.       Which OpenFileDialog control property specifies the choices in the “Files of type” dropdown box?
            a.)  FileName
b.)  FileNames
c.)  FileType
d.)  Filter
e.)  FilterIndex

Answer:  d                                                                   Level: Moderate

43.       Which property is the same in the OpenFileDialog and the SaveFileDialog control?                                
            a.)  FileName
b.)  Filter
c.)  InitialDirectory
d.)  Both a and b.
e.)  All of the above.

Answer:  e                                                                   Level: Moderate
  
44.       Which method is found in both the StreamReader and StreamWriter class?
            a.)  Close
b.)  Peak
c.)  Flush
d.)  Both a and b.
e.)  All of the above.

Answer:  a                                                                   Level: Easy

45.       The StreamReader and StreamWriter class are both subclasses of which class?
            a.)  IO
b.)  Stream
c.)  StreamIO
d.)  Both a and b.
e.)  All of the above.

Answer:  b                                                                   Level: Hard

46.       Which dialog control allows the user to zoom in on a document?
            a.)  PrintDialog
b.)  PrintPreview
c.)  PageSetupDialog
d.)  Both a and b.
e.)  All of the above.

Answer:  b                                                                   Level: Moderate

47.       Which dialog control has a Document property?
            a.)  PrintDialog
b.)  PrintPreview
c.)  PageSetupDialog
d.)  Both a and b.
e.)  All of the above.

Answer:  e                                                                   Level: Easy

48.       Which object must be assigned to the Document property?                                
            a.)  Document
b.)  DocumentPage
c.)  DocumentPrint
d.)  PageDocument
e.)  PrintDocument

Answer:  e                                                                   Level: Hard

49       When is the PrintPage event activated?
            a.)  When the PrintDialog control is displayed.
b.)  When an assignment is made to the Document property.
c.)  The first time the Print method is called.
d.)  Every time a page is printed after the Print method is called.
e.)  None of the above.

Answer: d                                                                    Level: Moderate

50.       Which controls can activate the PrintPage event?
            a.)  PrintDialog
b.)  PrintPreview
c.)  PageSetupDialog
d.)  Both a and b.
e.)  All of the above.

Answer:  d                                                                   Level: Moderate




1 comment: