Call
whatsapp
9447387064 | 9847003556
0471-2335855 | 8089080088 | 0471-2334855
9447387064 | 9847003556
0471-2335855 | 8089080088 | 0471-2334855
Cisco Training in Trivandrum, Trinity Technologies

No.1 Training Institute in Kerala

C++ - QUESTIONS : PART 4

When an exception is thrown, it needs to be …………………

Executed

 Handled appropriately

 Resolved

None of the above
SHOW ANSWER

After defining the function template, the next step to call it in another function such as ………

int()

 secondary()

 template()
 
 main()
SHOW ANSWER

A file stream refers to the flow of data between a ……………

Program and object

 Program and stream

 Program and file

 None of the above
SHOW ANSWER

……………… are one of the attributes of C++ that support run-time polymorphism.
 

Pointers

 Derived classes

 Virtual functions

 Heap tree
SHOW ANSWER

which of the following header file does not exist?

iostream

 string

 sstring

 sstream
SHOW ANSWER

To increase the value of c by one, which of the following is wrong?

c++;

 c=c+1;

 c+1=>

c+=1;
SHOW ANSWER

The ……………. Operator is known as insertion operator.

>>

 >

 <<

 <
SHOW ANSWER

State True or False.
i) A satic function can have access to only other static members (functions or variables) declared in the same class.
ii) A static member function can be called using the class name (instead of its objects)

True, True

True, False

 False, True

 False, False
SHOW ANSWER

 Which of the following condition is true for an object used as a function argument?
i) A copy of the entire objects is passed to the function.
ii) Only the address of the object is transferred to the function.

Only i

 Only ii

 Both i and ii

 None of them
SHOW ANSWER

 …………… enable us to hide, inside the object, both the data fields and the methods that act on that data.

Encapsulation

 Polymorphism

 Inheritance

Overloading
SHOW ANSWER

Which of the following is/ are the characteristics of friend function.

 It is not in the scope of the class to which it has been declared as friend.

 It can invoke like a normal function without the help of any object.

Usually, it has the objects as arguments.

 All of the above.
SHOW ANSWER

The dereferencing operator ………….. is used to access a member when we use pointers to both the object and the member.

->*

.*

 Any of the above

 None of the above
SHOW ANSWER

A ………………. Is a class whose instances themselves are classes.
 

Subclass

 Abstract Class

Meta Class

 Object Class
SHOW ANSWER

The dereferencing operator ……… is used when the object itself is used width in the member pointer.

->*

 .*

 Any of the above

 None of the above
SHOW ANSWER

A constructor that accepts no parameters is called the ……………….

Paramless constructor

 No parameter constructor

 Default constructor

 Argumentless constructor
SHOW ANSWER

Automatic initialization of object is carried out using a special member function called …………

Friend

 Casting

 Reference Parameter

 Constructor
SHOW ANSWER

Which of the following characteristics of constructor are true.
i) They should be declared in the public section.
ii) They are invoked automatically when the objects are created.
iii) They do not have return type and void also.
iv) We cannot refer their address.
v) Constructors cannot virtual.

Only i, ii, iii and v

 Only ii, iii, iv, and v

 Only i, iii, iv and v

 All i, ii, iii, iv and v
SHOW ANSWER

 A ……………. takes a reference to an object of the same class as itself as an argument.

Reference constructor

 Copy Constructor

Self Constructor

None of the above
SHOW ANSWER
BACK | NEXT
TRINITY SOFTWARE SOLUTIONS,IInd floor, Radheyam Towers, Gandhari Amman Kovil Road, Pulimood, Trivandrum - 1
0471-2334855 | 2335855 | 9447387064 | 9847003556 info@trinitytechnology.in