Object Oriented Programming - Basics of C++

16:  

Which of the following cannot be declared static?    

A.

Class

B.

Object

C.

Functions

D.

Both (a) & (b)

 
 

Option: D

Explanation :

Click on Discuss to view users comments.

Reham Ejaz said: (2:10pm on Friday 28th July 2017)
Inner class can be static in java

Write your comments here:



17:  

The order in which operands are evaluated in an expression is predictable if the operator is;    

A.

*

B.

+

C.

%

D.

&&

 
 

Option: D

Explanation :

The order in which operands are evaluated in an expression is not defined by the language and is compiler-dependent. For example, pop ( ) - pop ( ) may do (current top stack) - (the data just below the current top), or vice-versa, depending on which pope ) call is executed first.
However, the order of evaluation for the operator & & is defined by the language. It evaluates from left to right. Do not confuse order of evaluation with associativity.

Click on Discuss to view users comments.

Write your comments here:



Related MCQ