Top

Discussion

What is the output of this C code?

#include 
    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

Answer: B

No answer description available for this question.

No comment is present. Be the first to comment.
Loading…

Post your comment