July 16, 2021 in C and CPP
A default constructor takes
1.10 A default constructor takes
A) One parameter
B) Two parameters
C) Three parameters
D) No parameters
July 16, 2021 in C and CPP
1.10 A default constructor takes
A) One parameter
B) Two parameters
C) Three parameters
D) No parameters
July 16, 2021 in C and CPP
1.9 Which of the given statements is true about the expression int (*f) ( );?
A) f is a function which returns pointer to integer
B) The expression is syntactically incorrect
C) f is a pointer to a function which returns an integer
D) f is a function of pointers that returns an integer
July 16, 2021 in C and CPP
1.8 In C++, what is a pointer?
A) A variable that points to memory-resident programs
B) A variable that stores the memory address
C) An indication for the variable to be accessed next
D) The datatype of an address variable
July 16, 2021 in C and CPP
1.7 A function that is granted access to private and protected members of a class is called
A) A Member function
B) An Inline function
C) A Friend function
D) A Non-member function
July 16, 2021 in C and CPP
1.6 The process of using the same name for two or more functions is called
A) Function overriding
B) Function overloading
C) Operator overloading
D) Overridden functions
July 16, 2021 in C and CPP
1.5 Memory during runtime can be obtained by
A) Static allocation
B) Heap
C) Stack manipulation
D) Dynamic memory allocation
July 16, 2021 in C and CPP
1.4 When a subclass inherits from a class which itself has inherited from another class, it is known as:
A) Multilevel inheritance
B) Single inheritance
C) Multiple inheritance
D) Hierarchical Inheritance
July 16, 2021 in C and CPP
1.3 Consider the declaration: char arr [15]; What does arr point to?
A) Starting address of the array
B) Size of the array
C) Ending address of the array
D) Number of elements in the array
July 16, 2021 in C and CPP
1.2 Which of the following is a characteristic of a class?
A) A class can have only one object
B) A class is a template to create objects
C) A class contains only data
D) A class contains only methods.
July 16, 2021 in C and CPP
1.1 Which of the object-oriented programming pillars is not supported by C++?
A) Capitalization
B) Encapsulation
C) Polymorphism
D) Inheritance