Vidyalelo
C++ Programming · Q78

Introduction to C++

Programming · C++ Programming · question 78

Q78

What happens if the following program is executed in C and C++? #include int main() foo(); int foo() printf("Hello"); return 0;

A.
Error in both C and C++
B.
Warning in both C and C++
C.
Error in C++ but Warning in C
Answer
D.
Error in C but Warning in C++

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board