OOPs Using C++
Description: Test your skill in Object Oriented Programming. | |
Number of Questions: 25 | |
Created by: Aliensbrain Bot | |
Tags: C++ OOPS Programming OOPs |
Which of the following is NOT a feature of OOPS?
Which of the following members is NOT accessible through a 'Friend Function'?
With reference to classes and objects, when does a constructor of a class invoke by the C++ compiler ?
Which of the following statements is TRUE with reference to 'Method Overloading'?
Which of the following statements is FALSE regarding destructors?
Which of the following operators is used to define the class methods, physically outside the class?
The members (variables and methods) of a class are by default specified as _________
What will happen if the derived class and the base class contain a member with the same name?
Which of the following operators cannot be overloaded?
A class that cannot be instantiated is known as
When the compiler cannot differentiate between two overloaded constructors or methods, it is called
Which of the following is NOT an advantage of functions?
Which of the following statements is TRUE regarding 'Pure Virtual Functions'?
The function that calls itself is known as
Which of the following is NOT a use of the scope resolution operator (::) in C++?
Which of the following statements is TRUE about constructors and destructors?
Which of the following is not a type of constructor in C++?
Which of the following statements is TRUE regarding static class members?
While overloading an operator, the name of the method must be
With reference to Friend functions, which of the following statements is FALSE?
Which of the following is the correct syntax to declare a Pure Virtual Function?
Which of the following is the correct syntax to call the parameterized constructor of class 'sample' from the constructor of class 'sub'?
class sample {
public:
sample(int a) {}
};
class sub {};
What will be the size (in bytes)of an object of class child in the code given above?
class super {
int a;
public:
int b : protected : int c;
};
class parent : public super {
float d;
protected:
char e;
};
class child : private parent {
int f;
public:
float g;
};
Format! Style:
C++ online code formatter © 2014 by KrzaQ
Powered by vibe.d, the D language and clang-format
What will be the output of the above code?
class base1 {
public:
base1() { cout <
Which of the following statements is FALSE?
class base {
public:
void show() {}
};
class sub : private base {
public:
void print() {}
protected:
void display() {}
};
void main() { sub objs; }