Skip to main content

Visual Programming MCQs with Answers

Practice important Visual Programming MCQs with answers and explanations.

Multiple Choice Questions

Q131: Which operator is used for string concatenation in C#?
  • A: +
  • B: -
  • C: *
  • D: /
View Answer
A

Q132: Which operator in C# is used to access array elements?
  • A: . (dot)
  • B: [] (brackets)
  • C: -> (arrow)
  • D: {} (curly braces)
View Answer
B

Q133: How are arrays indexed in C#?
  • A: Zero-based
  • B: One-based
  • C: Two-based
  • D: Three-based
View Answer
A

Q134: What is a jagged array in C#?
  • A: An array of different data types
  • B: A multi-dimensional array
  • C: An array of arrays
  • D: A sorted array
View Answer
C

Q135: What will the following code print? Console.writeline("myints[0]: {0}, myints[1]: {1}", myints[0], myints[1]);
  • A: Values of myints array
  • B: Addresses of myints array elements
  • C: Length of myints array
  • D: Names of myints array elements
View Answer
A

Q136: What is the purpose of a switch statement in C#?
  • A: To control data flow
  • B: To define variables
  • C: To iterate over arrays
  • D: To handle multiple possible values of a variable
View Answer
D

Q137: Which control statement would you use for a conditional check in C#?
  • A: switch
  • B: loop
  • C: goto
  • D: if-else
View Answer
D

Q138: Which of the following types can be used in a switch statement in C#?
  • A: Floats
  • B: Strings
  • C: Doubles
  • D: Complex numbers
View Answer
B

Q139: What kind of loop is this? for (int i = 0; i < 10; i++) { }
  • A: while loop
  • B: do-while loop
  • C: for loop
  • D: foreach loop
View Answer
C

Q140: What kind of loop is the following? while (condition) { }
  • A: do-while loop
  • B: for loop
  • C: while loop
  • D: foreach loop
View Answer
C

Test Your Knowledge

Take a timed quiz on Visual Programming

🚀 Start Quiz Now