What will be the output of the following C code? [code] #include <stdio.h> void foo(float *); int main() { int

Trung Minh

New member
What will be the output of the following C code?
Code:
    #include <stdio.h>
    void foo(float *);
    int main()
    {
        int i = 10, *p = &i;
        foo(&i);
    }
    void foo(float *p)
    {
        printf("%f\n", *p);
    }
A. 10.000000
B. 0.000000
C. Compile time error
D. Undefined behaviour
 

Tìm kiếm

Back
Top