Curioustab
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Home
»
C# Programming
»
Control Instructions
What will be the output of the C#.NET code snippet given below? int val; for (val = -5; val <= 5; val++) { switch (val) { case 0: Console.Write ("India"); break; } if (val > 0) Console.Write ("B"); else if (val < 0) Console.Write ("X"); }
XXXXXIndia
IndiaBBBBB
XXXXXIndiaBBBBB
BBBBBIndiaXXXXX
Zero
Show Answer
Correct Answer:
XXXXXIndiaBBBBB
← Previous
Next →
Discussion & Comments
No comments yet. Be the first to comment!
Name:
Comment:
Post Comment