Expressions

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

A f1, f2, f3

B None of above

C f1, f2, f3

D Order may vary from compiler to compiler

ANS:C - Order may vary from compiler to compiler

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.



img not found
img

For help Students Orientation
Mcqs Questions

One stop destination for examination, preparation, recruitment, and more. Specially designed online test to solve all your preparation worries. Go wherever you want to and practice whenever you want, using the online test platform.