a. public
b. private
c. protected
d. friend
The correct option is (b)
Explanation:
Private access specifier is used as a default in a class definition.
a. Memory leak
b. An Issue in creating object of the class
c. An issue in calling base class destructor
d. None of the above
The correct option is (a)
Explanation:
in c++ Virtual destructor is use to maintain the hierarchy of destructor calls for polymorphic classes in inheritance. If we do not use it then it may cause resource leak or memory leak.
The correct option is (a)
Explanation:
Function overloading is a mechanism of static polymorphism.
a. Encapsulation
b. Inheritance
c. Composition
d. None of the above
The correct option is (b)
Explanation:
Explanation: IS A relationship in C++ is Inheritance.
a. &
b. *
c. _
d. %
The correct option is (a)
Explanation:
& operator is called address operator and is used to access the address of a variable
a. Parameters which are used in the definition of a function.
b. Parameters with which functions are called.
c. Variables that are never used in the function
d. Variables other than passed parameters in a function
The correct option is (b)
Explanation:
Actual parameters are those using which a function call is made i.e. which are actually passed in a function when that function is called
a. getline(ch).
b. cin.get(ch).
c. scanf(ch)
d. read(ch)
The correct option is (b)
Explanation:
C++ provides cin.get() function to read a single character from console whereas others are used to read either a single or multiple characters.
a. cout.putline(ch)
b. cout.put(ch)
c. write(ch)
d. printf(ch)
The correct option is (b)
Explanation:
C++ provides cout.put() function to write a single character to console whereas others are used to write either a single or multiple characters
a. Set of characters that whose use are avoided in C++ programs
b. Set of characters that are used in the name of the main function of the program
c. Set of characters that convey special meaning in a program
d. Set of characters that are avoided in cout statements
The correct option is (c)
Explanation:
Escape sequence is a set of characters that convey a special meaning to the program. They are used to convey a meaning which cannot be conveyed directly.