Home
Current Affairs January 2024

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.

Correct Answer :

C. Structure variable


Related Questions

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

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

A. True

B. False

What is the correct answer?

4

What is the output of the following program segment - for(i = 1, j = 0; i < 10; i++) j += i; cout <<i<<"
";

A. 10

B. 20

C. 55

D. there is an error in the program

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

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 member of a structure can be directly accessed by

A. ->

B. dot operator

C. ::

D. >>

What is the correct answer?

4

Static data member occurs in only class scope.

A. True

B. False

What is the correct answer?

4

The template function declaration specifies

A. template class

B. a generic class

C. exception

D. identifier

What is the correct answer?

4

In case of nested class, enclosing class can directly access the private data member of nested class.

A. True

B. False

What is the correct answer?

4

A pure virtual function is a virtual function that has

A. no definition in its base class

B. a definition in its base class

C. a definition in at least one derived class

D. definition in base class and at least one derived class

What is the correct answer?

4

ios containes a pointer to streambuf.

A. True

B. False

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

A destructor can have a return type.

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

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

Protected members cannot be inherited.

A. True

B. False

What is the correct answer?

4

The break statement causes an exit

A. Only from the innermost loop

B. Only from the innermost switch

C. From all loops and switch

D. Only from the innermost loops or switch

What is the correct answer?

4

A destructor can have arguments like constructor.

A. True

B. False

What is the correct answer?

4

Classes are useful because they

A. Are removed from memory when not in use

B. Permit data to be hidden from other classes

C. Bring together all aspects of an entity in one place

D. Can closely model objects in the real world

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

iostream is inheried from istream, ostream and ios class.

A. True

B. False

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

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

A. True

B. False

What is the correct answer?

4

Private members of a structure can be accessed directly from the outside of the structure.

A. True

B. False

What is the correct answer?

4

Class is similar to a variable.

A. True

B. False

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

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

The && and || operators

A. Compare two numeric values

B. Combine two numeric values

C. Compare two Boolean values

D. Combine two Boolean values

What is the correct answer?

4

What is the value of Friday in the following - enum days { Monday, Tuesday, Wednesday = -1, Thursday, Friday, Saturday = 6, Sunday}

A. 1

B. 5

C. 0

D. -3

What is the correct answer?

4

A constructor cannot be explicitly called.

A. True

B. False