Questions and Answers


  1. What is the output of this program?
    #include 
    using namespace std;
    int main()
    {
    char ch[30];
    cout << "Enter Name: ";
    gets(ch);
    cout << "Name: ";
    puts(ch);
    return 0;
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    In this program,we need to string header file to run this program.
    Compilation Error

    In function 'int main()':
    7:18: error: 'gets' was not declared in this scope


  1. What does a default header file contain?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    In the header file, we define something that to be manipulated in the program.



  1. Identify the incorrect statement.











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    The iostream.h is used in the older versions of c++ and iostream is evolved from it in the std namespace.


  1. Which of the following keyword is used to declare the header file?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    The include keyword is used to include all the required things to execute the given code in the program.



  1. What is the user-defined header file extension in c++?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    h