Home
Current Affairs January 2024

What is the correct answer?

4

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

A. True

B. False

Correct Answer :

A. True


Related Questions

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

_____________ operator must have one class object

A. +

B. new

C. all

D. None of these

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

Class is similar to a variable.

A. True

B. False

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

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

A. derived class

B. inline function

C. constructor

D. none of the above

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

main() returns a value of type

A. real

B. char

C. int

D. null

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

Member function cannot be called from within a constructor.

A. True

B. False

What is the correct answer?

4

Scope resolution operator has the highest precedence.

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

What is the correct answer?

4

Constructor returns void type value.

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

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

A. True

B. False

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

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 signature of a function is

A. The return type

B. The number and type of arguments

C. The class of a function

D. None of the above

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

A destructor can have a return type.

A. True

B. False

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

this' is an implicit pointer.

A. True

B. False

What is the correct answer?

4

The new operator always returns a void pointer.

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

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

The getch() library function

A. Returns a character when any key is pressed

B. Returns a character when ENTER is pressed

C. Display a character on the screen when a key is pressed

D. Does not display a character on the screen

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