Home / CSE MCQs / C++ - MCQs :: Discussion

Discussion :: C++ - MCQs

  1. What is the output of this program?

    #include < iostream >

    using namespace std;

    void mani()

    void mani()

    {

    cout << "hai";

    }

    int main()

    {

    main();

    return 0;

    }

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

    View Answer

    Workspace

    Answer : Option C

    Explanation :

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


Be The First To Comment