Home
Current Affairs January 2024

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

Correct Answer :

B. One


Related Questions

What is the correct answer?

4

The members of a class can be made private by

A. declaring them private

B. by default they are private

C. by declaring them in the beginning of the program immediately after main()

D. they are always public

What is the correct answer?

4

In C++, the stream base class is

A. iostream

B. iofstream

C. ios

D. stdio

What is the correct answer?

4

Protected 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

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

A. True

B. False

What is the correct answer?

4

The ?: can be used to replace

A. if-else statement

B. wild cards

C. no meaning in C++

D. returns the value

What is the correct answer?

4

In C++, the keyword auto can be used for

A. Automatic assignment of data to object during instantiation

B. Automatic call of a function

C. To declare a local variable

D. It is not a keyword in C++

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

When one object initializes another object the following function is invoked

A. copy constructor

B. new

C. instantiation

D. none of the above

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

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

Overloaded functions

A. Are a group of functions with the same name

B. All have the same number and types of arguments

C. Make life simpler for programmer

D. May fail unexpectedly due to stress

What is the correct answer?

4

Which of the following are good reasons to use an object oriented language?

A. You can define your data types

B. Program statements are simpler than in procedural languages.

C. An OO program can be taught to correct its own errors.

D. It's easier to conceptualize an OO program.

What is the correct answer?

4

The member of a structure can be accessed through a pointer by

A. ->

B. dot operator

C. ::

D. >>

What is the correct answer?

4

Protected members cannot be inherited.

A. True

B. False

What is the correct answer?

4

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

A. instantiation

B. function prototype

C. constructor

D. destructor

What is the correct answer?

4

By default, members cannot be inherited.

A. True

B. False

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

this' is an implicit pointer.

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

When a language has the capacity to produce new data type, it is said to be

A. Reprehensible

B. Encapsulated

C. Overload

D. Extensible

What is the correct answer?

4

iostream is inheried from istream, ostream and ios class.

A. True

B. False

What is the correct answer?

4

A constructor cannot be explicitly called.

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

The exception is processed using

A. unexpected()

B. perform()

C. catch()

D. try()

What is the correct answer?

4

Organizing data with methods that operate on the data and creating a new data type is called encapsulation.

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

Private data members can be accessed

A. Only from the base class itself

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

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

D. None of the above is correct

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 member functions have file scope.

A. True

B. False

What is the correct answer?

4

Friend function have access to the

A. private and protected members

B. public members only

C. private members only

D. None of the above are correct