Home
Current Affairs January 2024

What is the correct answer?

4

The exception is processed using

A. unexpected()

B. perform()

C. catch()

D. try()

Correct Answer :

C. catch()


Related Questions

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

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

Protected members cannot be inherited.

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

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

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

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

Reference to an object behaves like a constant pointer.

A. True

B. False

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

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

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

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

A destructor can have arguments like constructor.

A. True

B. False

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

In a for loop with a multi-statement loop body, semicolons should appear following

A. The for statement itself

B. The closing brace in a multi-statement loop body

C. Each statement within the loop body.

D. The test expression

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

iostream is inheried from istream, ostream and ios class.

A. True

B. False

What is the correct answer?

4

The library function exit() causes an exit from

A. The loop in which it occurs

B. The block in which it occurs

C. The function in which it occurs

D. The program in which it occurs

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

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

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

A. ->

B. dot operator

C. ::

D. >>

What is the correct answer?

4

Scope resolution operator has the highest precedence.

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

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

_______ 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

main() returns a value of type

A. real

B. char

C. int

D. null

What is the correct answer?

4

A destructor can have a return type.

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

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

A. instantiation

B. function prototype

C. constructor

D. structure