Top 50+ Solved Dot Net Architecture and Program MCQ Questions Answer

From 1 to 15 of 41

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

a. 66

b. 67

c. 68

d. “c”

  • b. 67

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.

  • a. abc

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)

  • a. “hello world”

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.

  • b. “cat” < “cat”

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)

  • 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

  • a. and, or, not

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

  • 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

  • b. x is equal to 4

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

  • c. anywhere in the program region, except inside a procedure

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

  • a. local scope

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.

  • 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)

  • 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

  • c. parameters

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.

  • b. they make a program run faster.

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.

  • a. arguments appear in call statements; parameters appear in sub statements.
Subscribe Now

Get All Updates & News