Home
Current Affairs January 2024

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

Correct Answer :

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


Related Questions

What is the correct answer?

4

In C++, an identifier must be initialized using constant expression.

A. True

B. False

What is the correct answer?

4

A function that is called automatically when an object is created is known as

A. instantiation

B. function prototype

C. constructor

D. structure

What is the correct answer?

4

By default, C++ uses the following method of passing arguments

A. Call-by-Reference

B. Call-by-Value

C. Call-by-Pointer

D. None of the above

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

By default, members cannot be inherited.

A. True

B. False

What is the correct answer?

4

Objects get destroyed in the reverse order as they are created.

A. True

B. False

What is the correct answer?

4

:: is known as

A. scope resolution operator

B. global operator

C. Both (a) & (b)

D. None of these

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

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

The scope resolution operator is -

A. ::

B. ;

C. <<

D. ->

What is the correct answer?

4

Sharing of common information are achieved by the concept of

A. Virtual copying

B. Inheritance

C. Encapsulation

D. None of these

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

You can read input that consists of multiple lines of text using

A. The normal cout<< combination

B. The cin.get() function with one argument

C. The cin.get() function with two argument

D. The cin.get() function with three argument

What is the correct answer?

4

Public data members can be accessed

A. Only from the base class itself

B. Both form the base class and from its derived classes

C. From the class which is friend of the base class

D. None of the above are correct

What is the correct answer?

4

Static member functions have file scope.

A. True

B. False

What is the correct answer?

4

A copy constructor is used to copy an object member wise to another object of the same class.

A. True

B. False

What is the correct answer?

4

Element double Array[7] is which element of the array?

A. sixth

B. seventh

C. eighth

D. impossible to tell

What is the correct answer?

4

A constructor cannot be explicitly called.

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

Protected members cannot be inherited.

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

It is possible to allow non member function access to private members of a class by declaring it as

A. public

B. friend

C. private

D. not possible

What is the correct answer?

4

One of the major disadvantage with late binding is

A. the source code should be made available at compile time

B. the program runs slower

C. dynamic variables can not be used in the program

D. static variables can not be used

What is the correct answer?

4

Reference to an object behaves like a constant pointer.

A. True

B. False

What is the correct answer?

4

When accessing a structure member, the identifier to the left of the dot operator is the name of

A. Structure member

B. Structure tag

C. Structure variable

D. The keyword struct.

What is the correct answer?

4

An object is an allocated space in memory.

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 can make function inline by using the keyword 'inline'.

A. True

B. False

What is the correct answer?

4

Scope resolution operator has the highest precedence.

A. True

B. False

What is the correct answer?

4

Which of the following is true about const member functions?

A. const members can be invoked on both const as well as nonconst objects

B. const members can be invoked only on const objects and not on nonconst objects

C. nonconst members can be invoked on const objects as well as nonconst objects

D. none of the above