Vidyalelo
C++ Programming · Q94

Introduction to C++

Programming · C++ Programming · question 94

Q94

What happens if the following program is executed in C and C++? #include void func() printf("Hello"); void main() func(); func(2);

A.
Error in both C and C++
B.
Outputs Hello twice in both C and C++
C.
Error in C and Outputs Hello twice in C++
D.
Error in C++ and Outputs Hello twice in C
Answer

Answer: Option D

Solution

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