Questions and Answers


  1. Which one is used to refer to program elements in any translation units?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    In the external linkage, it is used to refer to identifiers in various programs.


  1. To use internal linkage we have to use which keyword?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    static



  1. How are any types of linkage there in c++?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    There are three types of linkage in c++. They are an internal linkage, external linkage, and no linkage.


  1. What is the output of this program?
    #include 
    using namespace std;
    int GCD(int p, int q)
    {
    int temp;
    while (q != 0)
    {
    temp = p % q;
    p = q;
    q = temp;
    }
    return(p);
    }
    int main ()
    {
    int m = 10, n = 120;
    cout << GCD(m, n);
    return(0);
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    In this program, we are finding the gcd of the number.



  1. When will we use the function overloading?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    In function overloading, we can use any number of arguments but same function name.