What will be the output of the following C code?
#include <stdio.h>
void main()
{
char *str = "";
do
{
printf("hello");
} while (str);
}
#include <stdio.h>
void main()
{
char *str = "";
do
{
printf("hello");
} while (str);
}
A. Nothing
B. Run time error
C. Varies
D. Hello is printed infinite times
Answer: Option D
Join The Discussion