Home »
MCQs »
C# MCQs
What is the correct syntax for do while loop in C#?
41. What is the correct syntax for do while loop in C#?
-
do; {
statement(s);
} while (test_condition);
-
do
{
statement(s);
} while (test_condition)
-
do(test_condition) {
statement(s);
}while;
-
do {
statement(s);
} while (test_condition);
Answer: D)
do {
statement(s);
} while (test_condition);
Explanation:
The correct syntax of do...while statement is:
do {
statement(s);
} while (test_condition);