Q:

what will be the output of the following code?

0

what will be the output of the following code?

#include <stdio.h>
    void foo()
    {
        return 1;
    }
    void main()
    {
        int x = 0;
        x = foo();
        printf("%d", x);
    }

  1. Runtime error
  2. Compile Time error
  3. 0
  4. 1

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Correct Answer:

Compile Time error

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now