Curioustab
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Home
»
C# Programming
»
Control Instructions
Which of the following is the correct way to rewrite the following C#.NET code snippet given below? int i = 0; do { Console.WriteLine(i); i+ = 1; } while (i <= 10);
int i = 0; do { Console.WriteLine(i); } until (i <= 10);
int i; for (i = 0; i <= 10 ; i++) Console.WriteLine(i);
int i = 0; while (i <= 11) { Console.WriteLine(i); i += 1; }
int i = 0; do while ( i <= 10) { Console.WriteLine(i); i += 1; }
int i = 0; do until (i <= 10) { Console.WriteLine(i); i+=1; }
Show Answer
Correct Answer:
int i; for (i = 0; i <= 10 ; i++) Console.WriteLine(i);
← Previous
Next →
Discussion & Comments
No comments yet. Be the first to comment!
Name:
Comment:
Post Comment