-
Which of the following statement are correct about the program given below?
#include <stdio.h>
int main ( )
{
char ch;
while (ch = 0; ch <= 255; ch++)
printf ("ASCII value %d Character %c\n", ch, ch);
return 0;
}
-
- The program goes in an infinite loop.
- The program prints all the ASCII values with its corresponding characters.
- Error: ch should be declared as an int.
- The program reports an error as while loop cannot take the form of a for loop.
Correct Option: D
The program reports an error as while loop cannot take the form of a for loop.