Top 50+ Solved Dot Net Architecture and Program MCQ Questions Answer
Q. 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.
Q. 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)
Q. Which of the following is true?
a. “cat” = “cat”
b. “cat” < “cat”
c. “cat” > “cat”
d. relational operators are only valid for numeric values.
Q. 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)
Q. The three main logical operators are ________, _________, and ________.
a. and, or, not
b. and, not, if
c. or, not, if
d. false, and, true
Q. 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
Q. 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
Q. The declaration statement for a class-level variable should be placed __________.
a. inside an event procedure
b. inside a general procedure
c. anywhere in the program region, except inside a procedure
d. above the statement public class frmname
Q. Variables declared inside a procedure are said to have ________________.
a. local scope
b. procedure-level scope
c. class-level scope
d. none of the above
Q. Suppose the variable myName is declared in a Dim statement in two different Sub procedures. Which statement is true?
a. the program will malfunction when it is executed.
b. when the value of myname is changed in one sub procedure, it will also be changed in the other sub procedure.
c. visual basic’s smart editor will alert you that this is an error before the program is executed.
d. the two variables will be local to their respective sub procedures.
Q. Which of the following statements is guaranteed to pass the variable numVar by value to the Sub procedure Tally?
a. tally(numvar)
b. tally(byval numvar)
c. tally((numvar))
d. tally(byval numvar as double)
Q. The ______________ of a Sub procedure are vehicles for passing numbers and strings to the Sub procedure.
a. call statements
b. arguments
c. parameters
d. variables declared inside
Q. Which of the following is NOT a reason for using procedures?
a. they break a complex problem down into smaller pieces.
b. they make a program run faster.
c. they can be reused easily.
d. they make it possible for a team of people to work together on a single program.
Q. Which one of the following is true about arguments and parameters?
a. arguments appear in call statements; parameters appear in sub statements.
b. parameters appear in call statements; arguments appear in sub statements.
c. they are synonymous terms.
d. they are completely unrelated in a program.