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 str[] = "Steve jobs";

    int val = 65;

    char ch = 'A';

    cout.width (5);

    cout << right;

    cout << val << endl;

    return 0;

    }

  2. A.
    Steve jobs
    B.
    A
    C.
    5
    D.
    65

    View Answer

    Workspace

    Answer : Option D

    Explanation :

    In this program, We are printing the five spaces and then we are printing the value of 65.


Be The First To Comment