Sail E0 Webinar
Question

Which of the following is the correct order if calling functions in the below code?
a = f1(23, 14) * f2(12/4) + f3();


Options:
A .  f1, f2, f3
B .  f3, f2, f1
C .  Order may vary from compiler to compiler
D .  None of above
Answer: Option C

Here, Multiplication will happen before the addition, but in which order the functions would 

be called is undefined. In an arithmetic expression the parenthesis tell the compiler which 

operands go with which operators but do not force the compiler to evaluate everything within

 the parenthesis first.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers