On This Page

This set of Dot Net Architecture and Program Multiple Choice Questions & Answers (MCQs) focuses on Dot Net Architecture And Program Set 2

Q1 | Asc(“A”) is 65. What is Asc(“C”)?
  • 66
  • 67
  • 68
  • “c”
Q2 | Asc(“A”) is 65. What is displayed by txtBox.Text = Chr(65) & “BC”?
  • abc
  • a bc
  • 656667
  • not enough information is available.
Q3 | Which of the following expressions has as its value the words “Hello World? surrounded by quotation marks?
  • “hello world”
  • chr(34) & “hello world”
  • chr(34) & hello world & chr(34)
  • chr(34) & “hello world” & chr(34)
Q4 | Which of the following is true?
  • “cat” = “cat”
  • “cat” < “cat”
  • “cat” > “cat”
  • relational operators are only valid for numeric values.
Q5 | Which of the following is a valid Visual Basic conditional statement?
  • 2 < n < 5
  • 2 < n or < 5
  • 2 < n or 5
  • (2 < n) or (n < 5)
Q6 | The three main logical operators are ________, _________, and ________.
  • and, or, not
  • and, not, if
  • or, not, if
  • false, and, true
Q7 | Which value for x would make the following condition true: x >= 5
  • x is equal to 7
  • x is equal to 5
  • x is equal to 5.001
  • all of the above
Q8 | Which value for x would make the following condition true: Not (x >= 5)
  • x is equal to 7
  • x is equal to 4
  • x is equal to 5.001
  • x is equal to 5.001
Q9 | Which value for x would make the following condition true: (x >= 5) And (x <= 6)
  • x is equal to 7
  • x is equal to 5
  • x is equal to 5.001
Q10 | Constructs in which an If block is contained inside another If block are called:
  • multi-if blocks
  • nested if blocks
  • sequential if blocks
  • none of the above
Q11 | One may use an If block within a Select Case block.
  • true
  • false
Q12 | One may use a Select Case block within an If block.
  • true
  • false
Q13 | Select Case choices are determined by the value of an expression called a selector.
  • true
  • false
Q14 | Items in the value list must evaluate to a literal of the same type as the selector
  • true
  • false
Q15 | A single Case statement can contain multiple values.
  • true
  • false
Q16 | You can specify a range of values in a Case clause by using the To keyword.
  • true
  • false
Q17 | A variable declared inside a Select Case block cannot be referred to by code outside of the block.
  • true
  • false
Q18 | Suppose that the selector in a Select Case block is the string variable myVar. Which of the following is NOT a valid Case clause?
  • case “adams”
  • case “739”
  • case (myvar.substring(0, 1)
  • case myvar.length
Q19 | Different items appearing in the same value list of a Select Case block must be separated by a ____________.
  • semi colon
  • comma
  • colon
  • pair of quotation marks
Q20 | Which Case clause will be true whenever the value of the selector in a Select Case block is between 1 and 5 or is 8?
  • case 1 to 8
  • case 1 to 5, 8
  • case 1 to 8, 5
  • case 1 to 5; 8
Q21 | Which Case clause will be true whenever the value of the selector in a Select Case block is greater than or equal to 7?
  • case is >7
  • case is = 8
  • case is >= 7
  • case is <= 8
Q22 | What type of items are valid for use in the value list of a Case clause?
  • literals
  • variables
  • expressions
  • all of the above
Q23 | What happens to a variable declared locally inside a Sub procedure after the procedure terminates?
  • it maintains its value even after the end sub statement executes.
  • it ceases to exist after the end sub statement executes.
  • it loses its value temporarily after the end sub statement executes, but regains that value upon re-entry to the sub procedure.
  • it is reset to its default value.
Q24 | Suppose a variable is passed by reference to a parameter of a Sub procedure, and the parameter has its value changed inside the Sub procedure. What will the value of the variable be after the Sub procedure has executed?
  • it will have the newly modified value from inside the sub procedure.
  • its value can?t be determined without more information.
  • it will retain the value it had before the call to the sub procedure
  • none of the above.
Q25 | Suppose a variable is passed by value to a parameter of a Sub procedure, and the parameter has its value changed inside the Sub procedure. What will the value of the variable be after the Sub procedure has executed?
  • it will have the newly modified value from inside the sub procedure.
  • its value can?t be determined without more information
  • it will retain the value it had before the call to the sub procedure
  • none of the above.