Q:

if we run this code so what will be the output:

0

if we run this code so what will be the output:

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

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

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
what will be the output of the following code?... >>
<< Which keyword is used to give back the value...