Home
Current Affairs January 2024

What is the correct answer?

4

Class members are _______________ by default

A. Private

B. protected

C. public

D. None of the above are correct

Correct Answer :

A. Private


Related Questions

What is the correct answer?

4

The value of 'this' pointer can be changed.

A. True

B. False

What is the correct answer?

4

main() returns a value of type

A. real

B. char

C. int

D. null

What is the correct answer?

4

Which of the following can legitimately be passed to a function?

A. A constant

B. A variable

C. A structure

D. A header file

What is the correct answer?

4

Static data member can be declared as const too.

A. True

B. False

What is the correct answer?

4

In a class, only the member function can access data, which is not accessible to outside. This feature is called:

A. Data security

B. Data hiding

C. Data manipulation

D. Data definition

What is the correct answer?

4

Which of the following relationship is known as inheritancerelationship?

A. ‘has-a’ relationship

B. ‘is-a’ relationship

C. association relationship

D. none of the above

What is the correct answer?

4

ios containes a pointer to streambuf.

A. True

B. False

What is the correct answer?

4

A class that contains at least one pure virtual function is called as

A. pure class

B. abstract class

C. base class

D. derived class

What is the correct answer?

4

Member function cannot be called from within a constructor.

A. True

B. False

What is the correct answer?

4

Operator overloading is

A. Making C++ operators work with objects

B. Making C++ operators more then they can handle

C. Giving new meaning to existing c++ operators

D. Making new C++ operators

What is the correct answer?

4

this' pointer has to be used while accessing data members in a member function.

A. True

B. False

What is the correct answer?

4

Data objects can be initialized when allocating memory using 'new'.

A. True

B. False

What is the correct answer?

4

_______ argument(s) are passed in case of unary overloaded operators.

A. Two

B. One

C. No

D. None of the above

What is the correct answer?

4

Class is similar to a variable.

A. True

B. False

What is the correct answer?

4

Inline functions_____________ call overload.

A. Increase

B. Reduce

C. None of the above are correct

What is the correct answer?

4

_____________ operator must have one class object

A. +

B. new

C. all

D. None of these

What is the correct answer?

4

We can make function inline by using the keyword 'inline'.

A. True

B. False

What is the correct answer?

4

"[]" Operator is a unary operator.

A. True

B. False

What is the correct answer?

4

When you overload an arithmetic assignment operator, the result

A. Goes in the object to the right of the operator

B. Goes in the object to the left of the operator

C. Goes in the object of which the operator is a member

D. Must be returned

What is the correct answer?

4

A base class is inherited by

A. derived class

B. inline function

C. constructor

D. none of the above

What is the correct answer?

4

A normal C++ operator that acts in a special way on newly defined data types is said to be

A. Glorified

B. Encapsulated

C. Classified

D. Overloaded

What is the correct answer?

4

A direct access file is:

A. A file in which recoreds are arranged in a way they are inserted in a file

B. A file in which records are arranged in a particular order

C. Files which are stored on a direct access storage medium

D. None of the above

What is the correct answer?

4

A constructor cannot be explicitly called.

A. True

B. False

What is the correct answer?

4

A destructor can have arguments like constructor.

A. True

B. False

What is the correct answer?

4

The member of a structure can be directly accessed by

A. ->

B. dot operator

C. ::

D. >>

What is the correct answer?

4

If a friend function is declared inside a class it can access all data members of the class.

A. True

B. False

What is the correct answer?

4

Static data member occurs in only class scope.

A. True

B. False

What is the correct answer?

4

Inline function specifier reduces the overheads associated with a normal function call.

A. True

B. False

What is the correct answer?

4

The string table in C++ holds the

A. string constants in your program

B. program statements in string form

C. variables whose type is of string

D. none of the above

What is the correct answer?

4

We cannot have the address of a constructor.

A. True

B. False