Home
Current Affairs January 2024

What is the correct answer?

4

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

A. True

B. False

Correct Answer :

B. False


Related Questions

What is the correct answer?

4

Constructor returns void type value.

A. True

B. False

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

In C++, the stream base class is

A. iostream

B. iofstream

C. ios

D. stdio

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

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

Delete operator is used

A. To allocate storage

B. To deallocate storage

C. To delete variable name

D. None of the above are correct

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

"[]" Operator is a unary operator.

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

Reference to an object behaves like a constant pointer.

A. True

B. False

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

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

A. Two

B. One

C. No

D. None of the above

What is the correct answer?

4

The members of a class by default are private.

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

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 base class is inherited by

A. derived class

B. inline function

C. constructor

D. none of the above

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

If class A is friend of class B and if class B is friend of class C, which of the following is true?

A. Class C is friend of class A

B. Class A is friend of class C

C. Class A and Class C do not have any friend relationship

D. None of the above

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

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

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

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

A. True

B. False

What is the correct answer?

4

By using protected, one can create class members that are private to their class but

A. that can not be inherited and accessed by a derived class

B. that can still be inherited and accessed by a derived class

C. that can be public

D. none of the above

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

new operator is used

A. To dynamically allocate storage

B. To statically allocate storage

C. To allocate storage for a new variable

D. None of the above are correct

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

Protected members cannot be inherited.

A. True

B. False

What is the correct answer?

4

In C++, identifiers have to be declared at the beginning of the blocks.

A. True

B. False

What is the correct answer?

4

Static member functions have file scope.

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