closepop
closepop

Would you like to submit the test?


C++ :

OOPS Concepts




1.
Which of the following provides a reuse mechanism?

Abstraction
Inheritance
Dynamic binding
Encapsulation




2.
Which of the following statement is correct?

Class is an instance of object.
Object is an instance of a class.
Class is an instance of data type.
Object is an instance of data type.




3.
Which one of the following options is correct?

Friend function can access public data members of the class.
Friend function can access protected data members of the class.
Friend function can access private data members of the class.
All of the above.




4.
Which of the following statements is correct in C++?

Classes cannot have data as protected members.
Structures can have functions as members.
Class members are public by default.
Structure members are private by default.




5.
Which of the following is used to make an abstract class?

Declaring it abstract using static keyword.
Declaring it abstract using virtual keyword.
Making at least one member function as virtual function.
Making at least one member function as pure virtual function.




6.
Which of the following access specifier is used as a default in a class definition?

protected
public
private
friend




7.
What is correct about the static data member of a class?

A static member function can access only static data members of a class.
A static data member is shared among all the object of the class.
A static data member can be accessed directly from main().
Both A and B.




8.
Which of the following keyword is used to overload an operator?

overload
operator
friend
override




9.
What will happen if a class is not having any name?

It cannot have a destructor.
It cannot have a constructor.
It is not allowed.
Both A and B.




10.
Which inheritance type is used in the class given below? 
class A : public X, public Y {}

Multilevel inheritance
Multiple inheritance
Hybrid inheritance
Hierarchical Inheritance




11.
Which one of the following is correct about the statements given below?

All function calls are resolved at compile-time in Procedure Oriented Programming.
All function calls are resolved at compile-time in OOPS.

Only II is correct.
Both I and II are correct.
Only I is correct.
Both I and II are incorrect.




12.
Which of the following is an invalid visibility label while inheriting a class?

public
private
protected
friend




13.
Which of the following operators cannot be overloaded?

[]
->
?:
*




14.
In which of the following a virtual call is resolved at the time of compilation?

From inside the destructor.
From inside the constructor.
From inside the main().
Both A and B.




15.
Which of the following statements regarding inline functions is correct?

It speeds up execution.
It slows down execution.
It increases the code size.
Both A and C.




16.
Which one of the following is the correct way to declare a pure virtual function?

virtual void Display(void){0};
virtual void Display = 0;
virtual void Display(void) = 0;
void Display(void) = 0;




17.
Which of the following header file includes definition of cin and cout?

istream.h
ostream.h
iomanip.h
iostream.h




18.
Which of the following is a mechanism of static polymorphism?

Operator overloading
Function overloading
Templates
All of the above




19.
Which of the following is correct about the statements given below?

All operators can be overloaded in C++.
We can change the basic meaning of an operator in C++.

Only I is true.
Both I and II are false.
Only II is true.
Both I and II are true.




20.
Which of the following are available only in the class hierarchy chain?

Public data members
Private data members
Protected data members
Member functions




21.
Which of the following type of class allows only one object of it to be created?

Virtual class
Abstract class
Singleton class
Friend class




22.
Which of the following is not a type of constructor?

Copy constructor
Friend constructor
Default constructor
Parameterized constructor




23.
Which of the following is not the member of class?

Static function
Friend function
Const function
Virtual function




24.
Which of the following concepts means determining at runtime what method to invoke?

Data hiding
Dynamic Typing
Dynamic binding
Dynamic loading




25.
  Which of the following approach is adapted by C++?

Top-down
Bottom-up
Right-left
Left-right










FreshersLive - No.1 Job site in India. Here you can find latest 2016 government as well as private job recruitment notifications for different posts vacancies in India. Get top company jobs for both fresher and experienced. Job Seekers can get useful interview tips, resume services & interview Question and answer. Practice online test free which is helpful for interview preparation. Register with us to get latest employment news/rojgar samachar notifications. Also get latest free govt and other sarkari naukri job alerts daily through E-mail.


FreshersLive - No.1 Job site in India. Here you can find latest 2016 government as well as private job recruitment notifications for different posts vacancies in India. Get top company jobs for both fresher and experienced. Job Seekers can get useful interview tips, resume services & interview Question and answer. Practice online test free which is helpful for interview preparation. Register with us to get latest employment news/rojgar samachar notifications. Also get latest free govt and other sarkari naukri job alerts daily through E-mail.