Home
Current Affairs January 2024

What is the correct answer?

4

Constructor returns void type value.

A. True

B. False

Correct Answer :

B. False


Related Questions

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 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

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

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

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

A. True

B. False

What is the correct answer?

4

We cannot have the address of a constructor.

A. True

B. False

What is the correct answer?

4

The characteristic that data can be manipulated only through member functions that are part of the class is called

A. Encapsulation

B. Data dependency

C. Inheritance

D. Instantiation

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

Dynamic memory can be allocated by the following declaration

A. new

B. volatile

C. static

D. ==

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

Inline functions_____________ call overload.

A. Increase

B. Reduce

C. None of the above are correct

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

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

What is the correct answer?

4

Pick out the most appropriate statement

A. All variables must be declared before they are used

B. Variables in C++ need not be declared and the type can be assigned dynamically

C. Variables in C++ can be declared at the end of the program (before the main function terminates)

D. Variables can not be used explicitly in C++

What is the correct answer?

4

cc ___________ option is used only to create object file

A. -a

B. -o

C. -c

D. none of these

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

_____________ operator must have one class object

A. +

B. new

C. all

D. None of these

What is the correct answer?

4

A destructor can have arguments like constructor.

A. True

B. False

What is the correct answer?

4

A variable defined within a block is visible

A. From the point of definition onwards in the program

B. From the point of definition onwards in the function

C. From the point of definition onwards in the block

D. Throughout the function

What is the correct answer?

4

In C++, the exception handler is invoked with a-

A. try block

B. throw exception

C. catch function

D. abort()

What is the correct answer?

4

Pick out the most appropriate statement from the following

A. references are pointers

B. array of references can be created

C. you can not reference a reference variable

D. all of the above

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

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

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

"[]" Operator is a unary operator.

A. True

B. False

What is the correct answer?

4

One of the important features of an abstract class is

A. it need not have any object

B. it should be used only as a derived class

C. it need not have any members

D. none of the above

What is the correct answer?

4

A destructor can have a return type.

A. True

B. False

What is the correct answer?

4

Constructor returns void type value.

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

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