Examveda

What will be the output of the following C code?
#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


This Question Belongs to C Program >> Control Structures

Join The Discussion

Related Questions on Control Structures