R

Ram Sharma • 193.86K Points
Coach

Q. What happens if the following program is run in C and C++?

Code:
#include <stdio.h> 
void f(void)
{
  printf("Hello World!");
}
void main() 
{ 
  f();
 f(5);
}
  • (A) Error in C and C++
  • (B) Error in C and success in C++
  • (C) Error in C++ and success in C
  • (D) Display “Hello World!” twice in C and C++
  • Correct Answer - Option(A)
  • Views: 121
  • Filed under category C++

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics