Questions and Answers


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











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    h


  1. What is the use of no linkage?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    make the entity visible only to that block



  1. Which is used to use a function from one source file to another?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    By defining a function’s prototype in another file means, we can inherit all the features from the source function.


  1. What is the output of this program?
    #include 
    using namespace std;
    double Time()
    {
    double T = 26.25;
    double H = T;
    return H;
    }
    int main()
    {
    double H = Time();
    cout << "Weekly Hours: " << H;
    return 0;
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: E

    We are returning the value what we get as input.



  1. What is the output of this program?
    #include 
    using namespace std;
    int max(int p, int q)
    {
    return ( p > q ? p : q);
    }
    int main()
    {
    int m = 15;
    int n = 16;
    cout << max(m, n);
    return 0;
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: E

    In this program, we are returning the maximum value by using conditional operator.