Toggle navigation
Terms & Conditions
Contact
Home
GK
Computer
TRB
TNPSC
Aptitude
English
Reasoning
Technical
Bank Exams
SSC
Engineering
Puzzles
Interview
GD Topics
Blogs
Online Test
Free computer quiz Online Test - MeritNotes
Home
Online Exam
No. of Questions :10
Remaining Time :
1. Data abstraction in C++ is achieved by
(a)
Encapsulation()
(b)
Data Hiding()
(c)
Polymorphism()
(d)
Inheritance()
2. Data hiding refers to _____
(a)
not giving names to data
(b)
not specifying members and functions of a class
(c)
declaring members as public
(d)
members and functions of a class are not accessible by members of outside class
3. Which of the following statements in NOT true?
(a)
A non member function cannot access the private data of a class
(b)
The return type of a member function cannot be object data type
(c)
Several different classes can use the same function name
(d)
Member functions can be of static type
4. The private data of a class can be accessed
(a)
only by member functions of its own class and friend functions
(b)
only by member functions of its own class
(c)
only by friend functions
(d)
by any function
5. The member functions declared under which scope can be accessed by the objects.
(a)
protected
(b)
global
(c)
private
(d)
public
6. void sum:: input ()The above line tells
(a)
function input is sub function of sum
(b)
function sum is sub function of input
(c)
function input is declared within the class sum
(d)
function sum is declared within the class input
7. Declaration and function definitions are two specifications of which of the following
(a)
Comments
(b)
Class
(c)
Data type
(d)
None of the given
8. The body of the class starts and ends with
(a)
Braces i.e.., {}
(b)
Semi colon(;)
(c)
Start and stop
(d)
Begin and end
9. The class members declared _____ can be accessed only within the class and the members of the inherited classes.
(a)
protected
(b)
unprotected
(c)
public
(d)
private
10. Declaration of class member are declared as private can be accessed only
(a)
separately in another class
(b)
inside or outside the class
(c)
outside the class
(d)
within class