classes objects

Ques:- _____ of a class are data variables that represent the features or properties of a class.
A. Access specifiers
B. Visibility labels
C. Member functions
D. Data members

0 3819
Ques:- Declaration and function definitions are two specifications of which of the following
A. Comments
B. Class
C. Data type
D. None of the given

0 4263
Ques:- The members that can also be accessed from outside the class should be declared as
A. Protected
B. Private
C. Public
D. None of these

0 8051
Ques:- Members of a class are classified as
A. Data functions and member functions
B. Data hiding and data abstraction
C. Data variables and data hiding
D. Data members and member function

0 5101
Ques:- 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

0 6448
Ques:- Bjarne Stroustrup initially named C++ as
A. C with classes
B. Advanced C
C. Deep C
D. D

0 7942
Ques:- 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

0 9395
Ques:- int ex:: output ()
Which of the following is true with reference to the above line?
A. The function output returns integer data type
B. The function output returns ex type of data
C. The class output returns integer type of data
D. The function ex returns integer type of data

0 1906
Ques:- The body of the class starts and ends with
A. Braces i.e.., {}
B. Semi colon(;)
C. Start and stop
D. Begin and end

0 9967
Ques:- Data abstraction in C++ is achieved by
A. Encapsulation()
B. Data Hiding()
C. Polymorphism()
D. Inheritance()

0 5681
Ques:- 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

0 4856
Ques:- 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

0 6823
Ques:- The member functions declared under which scope can be accessed by the objects.
A. protected
B. global
C. private
D. public

0 6451
Ques:- 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

0 5344
Ques:- The members of a class are accessed using ___
A. New operator
B. Dot operator
C. + operator
D. Size of operator

0 3314
Ques:- The body of a class is terminated by a _____
A. .
B. ;
C. :
D. #

0 8631
Ques:- By default class members are treated as ____
A. Public
B. Private
C. Protected
D. Unprotected

0 9749
Ques:- The binding of data and functions together into a single entity is known as ____
A. Inheritance
B. Encapsulation
C. Overloading
D. Polymorphism

0 3225
Scroll to top