Classical

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 :


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.




Suggest an improvement