Sail E0 Webinar
Question
What is the output of this code having void return-type function?     void foo()    {        return 1;

    }

    void main()    {        int x = 0;        x = foo();        printf("%d", x);     }

Options:
A .  1
B .  0
C .  Runtime error
D .  Compile time error
Answer: Option D


None.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

More Questions on This Topic :


Latest Videos

Latest Test Papers