Q. What is the result of the following statements?

Code:
Dim strCities() As String = {"Bombay", "Chennai", "Ladakh", "Tamil Nadu"}
strCities(2)="Kolkata"
  • (A) Compilation Error
  • (B) Runtime Error
  • (C) strCity array is {"Bombay", "Ladakh", "Kolkata","Tamil Nadu"}
  • (D) strCity array is {"Bombay", "Chennai","Kolkata", "Tamil Nadu"}
πŸ’¬ Discuss
βœ… Correct Answer: (D) strCity array is {"Bombay", "Chennai","Kolkata", "Tamil Nadu"}

Q. Which of the following is false?

  • (A) The sequence of the arguments listed in the Call statement should agree with the sequence of the parameters listed in the receiving procedure's header.
  • (B) The data type of each argument in the Call statement should match the data type of its corresponding parameter in the procedure header.
  • (C) The name of each argument in the Call statement should be identical to the name of its corresponding parameter in the procedure header.
  • (D) When you pass information to a procedure by value, the procedure stores a copy of each value it receives in a separate memory location.
πŸ’¬ Discuss
βœ… Correct Answer: (C) The name of each argument in the Call statement should be identical to the name of its corresponding parameter in the procedure header.

Q. What output will be returned if the following Visual Basic code is executed?

Code:
strVisualBasic = "Sanfoundry, VB.Net"
intCharIndex = strVisualBasic.IndexOf("VB")
  • (A) 11
  • (B) 12
  • (C) False
  • (D) True
πŸ’¬ Discuss
βœ… Correct Answer: (B) 12

Q. Files that are read by computer are called as . . . . . . . .

  • (A) Input file
  • (B) Output file
  • (C) Random access file
  • (D) Sequential file
πŸ’¬ Discuss
βœ… Correct Answer: (A) Input file

Q. Using a named constant is advantageous because to change a value in future, change . . . . . . . .

  • (A) The value in the Const statement
  • (B) The value of the variable wherever it appears in the program
  • (C) The value of the variable anywhere in the program
  • (D) The value of the variable in one of the procedures in the program
πŸ’¬ Discuss
βœ… Correct Answer: (A) The value in the Const statement

Q. A . . . . . . . . displays a list of choices.

  • (A) List box
  • (B) Display box
  • (C) Choice box
  • (D) Check box
πŸ’¬ Discuss
βœ… Correct Answer: (A) List box

Q. The text box's . . . . . . . . event procedure prevents user from entering a specified character.

  • (A) KeyPress
  • (B) check
  • (C) checkchar
  • (D) checkinput
πŸ’¬ Discuss
βœ… Correct Answer: (A) KeyPress

Q. What will be the output of the following Visual Basic code?

Code:
Dim intScores As Integer = {78, 83, 75, 90}
Array.Sort(intScores)
Array.Reverse(intScores)
  • (A) 78, 83, 75,90
  • (B) 75,78, 83,90
  • (C) 78,75,83,90
  • (D) 90,83,78,75
πŸ’¬ Discuss
βœ… Correct Answer: (D) 90,83,78,75

Q. Progress bar is always work with . . . . . . . .control.

  • (A) text box
  • (B) timer
  • (C) menu
  • (D) none of these.
πŸ’¬ Discuss
βœ… Correct Answer: (B) timer

Q. Data in an array can be distinguished using . . . . . . . . number.

  • (A) Reference
  • (B) Subscript
  • (C) Array
  • (D) ID
πŸ’¬ Discuss
βœ… Correct Answer: (B) Subscript