Home
Current Affairs January 2024

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

Correct Answer :

D. destructor


Related Questions

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

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

In a class, only the member function can access data, which is not accessible to outside. This feature is called:

A. Data security

B. Data hiding

C. Data manipulation

D. Data definition

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

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

Sharing of common information are achieved by the concept of

A. Virtual copying

B. Inheritance

C. Encapsulation

D. None of these

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

ios containes a pointer to streambuf.

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

By default, members cannot be inherited.

A. True

B. False

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

Inline functions_____________ call overload.

A. Increase

B. Reduce

C. None of the above are correct

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 binding that binds a function call at run time is called

A. early binding

B. run time binding

C. late binding

D. linking

What is the correct answer?

4

The following syntax is valid. void inline gram_ panchayat :: show_gram_ panchayat_info().

A. True

B. False

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

The declaration int **var1; shows that

A. var1 can not be accessed

B. var1 is a pointer to a pointer of type int

C. var1 is a protected data type of integer

D. this type declaration shows an error

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

Static member functions have file scope.

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

We cannot have the address of a 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

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

A. True

B. False

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

The string table in C++ holds the

A. string constants in your program

B. program statements in string form

C. variables whose type is of string

D. none of the above

What is the correct answer?

4

The scope resolution operator is -

A. ::

B. ;

C. <<

D. ->

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

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

A destructor can have a return type.

A. True

B. False

What is the correct answer?

4

Class members are _______________ by default

A. Private

B. protected

C. public

D. None of the above are correct