Q1: Which of the following is a C++ compiler?
Q2: Which C++ feature allows the same function to have different behaviors?
Q3: What is the use of 'this' pointer in C++?
Q4: Which keyword is used to create a class in C++?
Q5: Which C++ concept is used for code reuse?
Q6: What is the output of: cout << 5 / 2;
Q7: Which access specifier makes class members accessible only within the same class?
Q8: Which operator is overloaded for input in C++?
Q9: What does 'cin' represent in C++?
Q10: Which header file is needed for input/output stream?
Q11: What is the keyword for defining a constant pointer?
Q12: What is the role of a constructor in a class?
Q13: What is the syntax to inherit a class in C++?
Q14: Which of the following is used to define a template?
Q15: Which container does not allow duplicate values in C++ STL?
Q16: Which of the following is used to create dynamic memory in C++?
Q17: What is the size of 'bool' data type in C++?
Q18: What is function overloading?
Q19: What is the output of: cout << true;
Q20: Which keyword is used to handle exceptions in C++?
Q21: Which block catches the thrown exception?
Q22: How do you declare a pure virtual function?
Q23: What is a virtual function?
Q24: Which operator cannot be overloaded?
Q25: Which function is called when an object goes out of scope?
Q26: Which keyword is used to refer to base class method?
Q27: What is the correct syntax to declare a reference variable?
Q28: Which of the following supports LIFO?
Q29: Which header is used for vectors in C++?
Q30: What is the output of: cout << sizeof(char);
Q31: Which function is used to sort a vector?
Q32: Which STL container uses key-value pairs?
Q33: Which of the following is a smart pointer in C++?
Q34: What does 'namespace' do in C++?
Q35: What is the default constructor?
Q36: Which operator is used to access members of a structure through a pointer?
Q37: Which feature of C++ allows using the same name for different types?
Q38: Which function is used to release memory allocated by new?
Q39: What is the return type of main() in C++?
Q40: Which keyword prevents a variable from being changed?
Q41: Which operator is used to compare two values?
Q42: Which keyword creates an alias for a data type?
Q43: Which type of inheritance involves one class derived from two base classes?
Q44: What is a friend function?
Q45: What is the extension of header files in C++?
Q46: What happens if a constructor is private?
Q47: Which loop is best when number of iterations is known?
Q48: Which keyword is used to declare a static variable?
Q49: What is the output of: cout << 'A' + 1;
Q50: What happens if delete is used on non-dynamic memory?