What is the output of the C#.NET code snippet given below?
A -
red
B -
blue
C -
0
D -
1
2-
Which of the following is the correct way to rewrite the following C#.NET code snippet given below?
A -
B -
C -
D -
3-
What will be the output of the C#.NET code snippet given below?
A -
XXXXXIndia
B -
IndiaBBBBB
C -
XXXXXIndiaBBBBB
D -
BBBBBIndiaXXXXX
4-
What will be the output of the C#.NET code snippet given below?
A -
case B | case b
B -
case D | case d
C -
Compile Error
D -
No output
5-
Which of the following is the incorrect form of Decision Control instruction?
A -
B -
C -
D -
6-
Which of the following can be used to terminate a while loop and transfer control outside the loop?
1/ exit while
2/ continue
3/ exit statement
4/ break
5/ goto
A -
1, 3
B -
2, 4
C -
3, 5
D -
4, 5
7-
The C#.NET code snippet given below generates ____ numbers series as output?
A -
Prime
B -
Fibonacci
C -
Palindrome
D -
Odd
8-
Which of the following statements are correct about the C#.NET code snippet given below?
1/ The condition no < 11 will be evaluated only if age > 18 evaluates to True.
2/ The statement a = 25 will get executed if any one condition is True.
3/ The condition no < 11 will be evaluated only if age > 18 evaluates to False.
4/ The statement a = 25 will get executed if both the conditions are True.
5/ && is known as a short circuiting logical operator.
A -
2, 5
B -
1, 4, 5
C -
3, 4, 5
D -
None of these
9-
Which of the following statements are correct?
1/ A switch statement can act on numerical as well as Boolean types.
2/ A switch statement can act on characters, strings and enumerations types.
3/ We cannot declare variables within a case statement if it is not enclosed by { }.
4/ The foreach statement is used to iterate through the collection to get the desired information and should be used to change the contents of the collection to avoid unpredictable side effects.
5/ All of the expressions of the for statement are not optional.
A -
1, 2
B -
3, 5
C -
4, 5
D -
None of these
10-
What will be the output of the C#.NET code snippet given below?