What will be the output of the following C code having void return-type function?
Posted: Wed Jul 13, 2022 7:54 pm
#include <stdio.h> void foo() { return 1; } void main() { int x = 0; x = foo(); printf("%d", x); }
a) 1
b) 0
c) Runtime error
d) Compile time error
a) 1
b) 0
c) Runtime error
d) Compile time error