Home » C++ Programming » Functions » Question
  1. What is the output of this program?
    #include 
    using namespace std;
    void fun()
    void fun()
    {
    cout<<"Inteview Mania";
    }
    int main()
    {
    fun();
    return 0;
    }
    1. Garbage value
    2. Inteview Mania
    3. Runtime Error
    4. Compilation Error
    5. None of these
Correct Option: D

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



Your comments will be displayed only after manual approval.