What will be the output of the following C code? [code] #include <stdio.h> void main() { double k = 0; for

Nguyễn Tân

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

Tìm kiếm

Back
Top