1. | What does the following C#.NET code snippet will print?
|
Discuss |
Answer: (a).Prints 1 to 9
|
2. | Which of the following is the correct output for the C#.NET program given below?
|
Discuss |
Answer: (c).20 16 12 8 4 0 -4 -8 -12
|
3. | Which of the following statements is correct? |
Discuss |
Answer: (d).The if statement selects a statement for execution based on the value of a Boolean expression.
|
4. | What is the output of the C#.NET code snippet given below?
|
Discuss |
Answer: (b).blue
|
5. | Which of the following is the correct way to rewrite the following C#.NET code snippet given below?
|
Discuss |
Answer: (b).B
|
6. | What will be the output of the C#.NET code snippet given below?
|
Discuss |
Answer: (c).XXXXXCompSciBBBBB
|
7. | What will be the output of the C#.NET code snippet given below?
|
Discuss |
Answer: (c).case D | case d
|
8. | Which of the following is the incorrect form of Decision Control instruction? |
Discuss |
Answer: (c).if (Condition1) {// Some statement}
else {// Some statement} else if ( Condition2){//Some statement} |
9. | Which of the following code snippets are the correct way to determine whether a is Odd or Even?
|
Discuss |
Answer: (b).1 Only
|
10. | 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 |
Discuss |
Answer: (d).4, 5
|