Q119
What happens if the following program is executed in C and C++? #include void func(void) printf("Hello"); void main() func(); func(2);
A.
Error in both C and C++
AnswerB.
Outputs Hello twice in both C and C++
C.
Error in C and successful execution in C++
D.
Error in C++ and successful execution in C
Answer: Option A
Solution
Answer: Option A
No explanation is given for this question Let's Discuss on Board