πŸ“Š C++
Q. What happens if the following program is executed in C and C++?
Code:
#include <stdio.h> 
void func(void)
{
	printf("Hello");
}
void main() 
{ 
	func();
	func(2);
}
  • (A) Error in both C and C++
  • (B) Error in C++ and successful execution in C
  • (C) Error in C and successful execution in C++
  • (D) Outputs Hello twice in both C and C++
πŸ’¬ Discuss
βœ… Correct Answer: (A) Error in both C and C++

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
233
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Babita
Publisher
πŸ“ˆ
85%
Success Rate