Dot Net Architecture and Program solved MCQs

26. Asc(“A”) is 65. What is Asc(“C”)?

a. 66

B. 67

c. 68

d. “c”

27. Asc(“A”) is 65. What is displayed by txtBox.Text = Chr(65) & “BC”?

a. abc

B. a bc

c. 656667

d. not enough information is available.

28. Which of the following expressions has as its value the words “Hello World? surrounded by quotation marks?

a. “hello world”

B. chr(34) & “hello world”

c. chr(34) & hello world & chr(34)

d. chr(34) & “hello world” & chr(34)

29. Which of the following is true?

a. “cat” = “cat”

B. “cat” < “cat”

c. “cat” > “cat”

d. relational operators are only valid for numeric values.

30. Which of the following is a valid Visual Basic conditional statement?

a. 2 < n < 5

B. 2 < n or < 5

c. 2 < n or 5

d. (2 < n) or (n < 5)

31. The three main logical operators are ________, _________, and ________.

a. and, or, not

B. and, not, if

c. or, not, if

d. false, and, true

32. Which value for x would make the following condition true: x >= 5

a. x is equal to 7

B. x is equal to 5

c. x is equal to 5.001

d. all of the above

33. Which value for x would make the following condition true: Not (x >= 5)

a. x is equal to 7

B. x is equal to 4

c. x is equal to 5.001

d. x is equal to 5.001

34. Which value for x would make the following condition true: (x >= 5) And (x <= 6)

a. x is equal to 7

B. x is equal to 5

c. x is equal to 5.001

35. Constructs in which an If block is contained inside another If block are called:

a. multi-if blocks

B. nested if blocks

c. sequential if blocks

d. none of the above

36. One may use an If block within a Select Case block.

a. true

B. false

37. One may use a Select Case block within an If block.

a. true

B. false

38. Select Case choices are determined by the value of an expression called a selector.

a. true

B. false

39. Items in the value list must evaluate to a literal of the same type as the selector

a. true

B. false

40. A single Case statement can contain multiple values.

a. true

B. false

41. You can specify a range of values in a Case clause by using the To keyword.

a. true

B. false

42. A variable declared inside a Select Case block cannot be referred to by code outside of the block.

a. true

B. false

43. Suppose that the selector in a Select Case block is the string variable myVar. Which of the following is NOT a valid Case clause?

a. case “adams”

B. case “739”

c. case (myvar.substring(0, 1)

d. case myvar.length

44. Different items appearing in the same value list of a Select Case block must be separated by a ____________.

a. semi colon

B. comma

c. colon

d. pair of quotation marks

45. 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?

a. case 1 to 8

B. case 1 to 5, 8

c. case 1 to 8, 5

d. case 1 to 5; 8

46. Which Case clause will be true whenever the value of the selector in a Select Case block is greater than or equal to 7?

a. case is >7

B. case is = 8

c. case is >= 7

d. case is <= 8

47. What type of items are valid for use in the value list of a Case clause?

a. literals

B. variables

c. expressions

d. all of the above

48. What happens to a variable declared locally inside a Sub procedure after the procedure terminates?

a. it maintains its value even after the end sub statement executes.

B. it ceases to exist after the end sub statement executes.

c. it loses its value temporarily after the end sub statement executes, but regains that value upon re-entry to the sub procedure.

d. it is reset to its default value.

49. 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?

a. it will have the newly modified value from inside the sub procedure.

B. its value can?t be determined without more information.

c. it will retain the value it had before the call to the sub procedure

d. none of the above.

50. 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?

a. it will have the newly modified value from inside the sub procedure.

B. its value can?t be determined without more information

c. it will retain the value it had before the call to the sub procedure

d. none of the above.

Tags

Question and answers in Dot Net Architecture and Program,

Dot Net Architecture and Program Multiple choice questions and answers,

Important MCQ of Dot Net Architecture and Program,

Solved MCQs for Dot Net Architecture and Program,

Dot Net Architecture and Program MCQ with answers PDF download

Jump to set ->

Each set has max 25 mcqs

Check your understanding of
Dot Net Architecture and Program

Dot Net Architecture and Program [set-2] solved mcqs PDF download

Share