Breaking

Join THAMIZHKADAL Telegram Group

Join THAMIZHKADAL WhatsApp Group

Monday, September 27, 2021

PG TRB COMPUTER INSTRUCTOR GRADE 1 STUDY MATERIAL - 04

1. Data members and member functions of a class in C++ program are by default

A.  protected

B.  public

C.  private

D.  None of these

2. Which operator is used to allocate an object dynamically of a class in C++?

A.  Scope resolution operator

B.  Conditional operator

C.  New operator

D.  Membership access

3. Which is used to define the member function of a class externally?

A.  :

B.  ::

C.  #

D.  None of these

4. In C++, an object cannot be created for

A.  An interface

B.  An Abstract class

C.  A singleton class

D.  A & B

5. By default functions available in C++ language are

A.  Constructor

B.  Destructor

C.  Copy constructor and Assignment operator

D.  All

6. True and false statements about inline function in given C++ code example is/are

(I) Static function of a class can be called by class name using scope resolution operator i.e. : :

(II) Static function can receive both static and non-static data members of a class

(III) Static function is not the part of an object of a class

A.  I and II

B.  I only

C.  I and III

D.  I, II and III

7. Which of the following functions are provided by compiler by default if we don’t write in a C++ class?

A.  Copy constructor

B.  Assignment

C.  Constructor

D.  All the above

8. Which function can be called without using an object of a class in C++

A.  Static function

B.  Inline function

C.  Friend function

D.  constant function

9. Which function can be called without using an object of a class in C++

A.  Virtual function

B.  Inline function

C.  Static function

D.  constant function

10. Which function cannot be overloaded in C++ program?

A.  Virtual function

B.  member function

C.  Static function

D.  All can be overloaded

No comments:

Post a Comment