C++ Programming Test

    Welcome to your C++ Programming Test

    1. Reusability is a desirable feature of a language as it __________.
    2. Choose the correct statements regarding inline functions.
    3. If many functions have the same name, which of the following information, if present, will be used by the compiler to invoke the correct function to be used?
    4. The below statement outputs __________? int a = 5; cout << "FIRST" << (a<<2) << "SECOND";
    5. Choose the correct remarks.
    6. A constructor is called whenever __________.
    7. Which of the following remarks about the differences between constructors and destructors are correct?
    8. The following program fragment __________. #include using namespace std; int main() { int x = 10; int &p = x; cout<< &p<< &x; return 0; }
    9. The declaration int x; int &p=x; is same as the declaration int x, *p; p=&x;. This remark is?
    10. The following program segment __________. const int m=10; int &n=m; n=11; cout << m << n;
    11. The following program segment __________. int a = 10; int const &b = a; a = 11; cout << a << b;
    12. Which of the following is not a storage class supported by C++?
    13. Consider the following program segment. A complete C++ program with these two statements will __________. static char X[3] = "1234"; cout << X;
    14. For the declarations 1,2 and 3, which of the Statements is correct. const char cc = 'h'; Declaration 1: char *cp; Declaration 2: const char *const ccpc = &cc; Declaration 3: char *const *cpcp; Which of the following statements are legal? Statement 1: cp = *cpcp; Statement 2: **cpcp = *cp; Statement 3: *cp = **cpcp;
    15. Which of the following operators cannot be overloaded?