Question: Use the following program for the questions below that ask about operand evaluation mechanisms. int global = 7; int funct] () { global --;
Use the following program for the questions below that ask about operand evaluation mechanisms. int global = 7; int funct] () { global --; return 3; } int funct2 (int & para) { Para -- return 3; } int main ( ) { int num1 = 7, result], result2; result] = global + funct1(): result2= num1 + funct2 (num1); cout < < "result=\" < < result! < < "\ result2=\t" < < result2; return 0; a) What is the output if the operands are evaluated left-to right =result] = result2 b) What is the output if the operands are evaluated right -to left result1= result2=
Step by Step Solution
3.46 Rating (156 Votes )
There are 3 Steps involved in it
Answer Lets analyze the provided program for both lefttoright and righttoleft operand evaluation mec... View full answer
Get step-by-step solutions from verified subject matter experts
