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

Discussion :: C++ - MCQs

  1. What is the output of this program?

    #include < iostream >

    using namespace std;

    int main( )

    {

    char line[100];

    cin.getline( line, 100, 't' );

    cout << line;

    return 0

    }

  2. A.
    100
    B.
    t
    C.
    It will print what we give.
    D.
    None of the mentioned

    View Answer

    Workspace

    Answer : Option C

    Explanation :

    In this program, We are printing the input what we read from cin.


Be The First To Comment