C - Functions - Discussion

You Are Here :: Home > C > Functions - Discussion

 



Q.

What is the output of this program?

#include
using namespace std;
void mani()
void mani()
{
cout<<"hai";
}
int main()
{
mani();
return 0;
}

A. hai B. haihai
C. compile time error D. none of the mentioned

Answer: Option C
Explaination:

We have to use the semicolon to declare the function in line 3. If we did means, the program will execute.



Discussion

Your Comments Goes here...
NameDiscussion