Monday, August 12, 2013

VB.NET MCQ With Answers Set 2 2013

1.       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                                                                   


2.       Which operator is evaluated first?

            a.)  NOT
b.)  AND
c.)  XOR
d.)  OR
e.)  They are always evaluated left-to-right.

Answer:  a                                                                   


3.       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                                                                  



4.       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                                                                   



5.       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                                                                   



6.       Which function returns the numbers represented in the string “$56.7”?

            a.)  Abs
b.)  CDbl
c.)  Int
d.)  Rnd
e.)  Val

Answer:  b                                                                   


7.       What will the function Val ($165.30) return?


            a.)  0
b.)  165
c.)  165.30
d.)  $165.30
e.)  An error

Answer:  a                                                                  



8.       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                                                                   



9.       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                                                                  



10.       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                                                                   


11.       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                                                                 



12.       Which TextBox property should always be changed first?

            a.)  AcceptsReturn
b.)  BorderStyle
c.)  Font
d.)  Name
e.)  Text

Answer: d                                                                    



13.       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                                                                   



14.       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                                                                  



15.       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                                                                  


16.       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                                                                   


17.       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                                                                  



18.       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                                                                 



19.       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                                                                   



20.       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                                                                  

4 comments: