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");
}
#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
Join The Discussion