C++ Programming Test By Kishor Raut - August 17, 2021 FacebookTwitterPinterestWhatsApp Welcome to your C++ Programming Test 1. Which of the following is correct option? #include using namespace std; namespace lfc1 { int var = 30; } namespace lfc2 { double var = 13.5478; } int main () { int a; a = lfc1::var + lfc2::var; cout << a; return 0; }A. 43.5478B. 43C. 44D. 30 2. Which of the following is correct option? #include using namespace std; namespace lfc1 { double var =30.1234; } namespace lfc2 { double var = 13.5478; } int main () { double a; a = lfc1::var - lfc2::var; cout << a; return 0; }A. 16.5756B. 17C. 15D. 16.57 3. Which of the following is correct option? #include using namespace std; namespace lfc1 { int x = 10; } namespace lfc2 { int x = 20; } int main () { int x = 30; lfc1::x; lfc2::x; cout << x; return 0; }A. 30B. 20C. 10D. Compile Error 4. Which of the following is correct option? #include using namespace std; namespace lfc { int x = 10; } namespace lfc { int x = 20; } int main () { int x = 30; lfc::x; lfc::x; cout << x; return 0; }A. 30B. 20C. 10D. Compile Error 5. Which keyword is used to access the variable in the namespace?A. usingB. dynamicC. constD. static 6. Which is the correct statement anout operator overloading in C++?.A. Only arithmetic operators can be overloadedB. Associativity and precedence of operators does not changeC. Precedence of operators are changed after overlaodingD. Only non-arithmetic operators can be overloaded 7. Which of the following operators cannot be overloaded?A. .* (Pointer-to-member Operator )B. :: (Scope Resolution Operator)C. .* (Pointer-to-member Operator )D. All of the above 8. While overloading binary operators using member function, it requires ___ argument?A. 2B. 1C. 0D. 3 9. Which of the following operators should be preferred to overload as a global function rather than a member method?A. Postfix ++B. Comparison OperatorC. Insertion Operator <<D. prefix ++ 10. Which of the following operator functions cannot be global, i.e., must be a member function.A. newB. deleteC. Converstion OperatorD. All of the above 11. Which of the following is correct option?A. x = 5, y = 10B. x = 10, y = 5C. Compile ErrorD. x = 5, y = 5 12. Which of the following is correct option?A. x = 15, y = 3B. x = 3, y = 15C. Compile ErrorD. x = 15, y = 15 13. Which of the following is correct option?A. lets(int) calledB. lets(lfc 2) calledC. Compiler Error: Ambiguous call to lets()D. No error and No output 14. Which of the following is the correct order involves in the process of operator overloading. i) Define the operator function to implement the required operations. ii) Create a class that defines the data type that is to be used in the overloading operation. iii) Declare the operator function op() in the public part of the class.A. 1-i, 2-ii, 3-iiiB. 1-ii, 2-iii, 3-iC. 1-ii, 2-i, 2-iiiD. 1-iii, 2-ii, 3-i 15. Which of the following is correct option?A. Compiler ErrorB. 8 10C. 8 8D. 10 8 Time is Up!