Examveda
Examveda

What will be the output of the following C code?
#include <stdio.h>
void main()
{
    double k = 0;
    for (k = 0.0; k < 3.0; k++)
        printf("Hello");
}

A. Run time error

B. Hello is printed thrice

C. Hello is printed twice

D. Hello is printed infinitely

Answer: Option B


This Question Belongs to C Program >> Control Structures

Join The Discussion

Related Questions on Control Structures