3 Questions
Which of the following while or do/while statements are valid in ANSI C and Betty-compliant?
a = 0; do { printf("%d\n", a); a++; } while (a < b);
Which of the following while or do/while statements are invalid in ANSI C and Betty-compliant?
a = 0; while (a = 0; a < b; a++) { printf("%d\n", a); }
Which of the following while or do/while statements will print the values of 'a' while 'a' is less than 'b' in ANSI C and Betty-compliant?
a = 0; while (a < b) ( printf("%d\n", a); a++; )
Test your knowledge of valid while and do/while statements in ANSI C and Betty-compliant syntax. Select all the correct statements from the given options.
Make Your Own Quizzes and Flashcards
Convert your notes into interactive study material.
Get started for free