Let the function fun be defined as int fun(int *k) { *k += 4; return 3 * (*k) - 1; } Suppose fun is used in a program as follows: void main() { int i = 10, j = 10, sum1, sum2; sum1 = (i / 2) + fun(&i); sum2 = fun(&j) + (j / 2); } What are the values of sum1 and sum2 ? ( a. if the operands in the expressions are evaluated left to right? b. if the operands in the expressions are evaluated right to left?

Respuesta :

The values of sum1 and sum2 if the operands in the expressions are evaluated left to right are; sum1 = 46 and sum2 = 48

How to use Operand in Programming?

In computer programming, the term operand is defined as the object of a mathematical operation or it is the object or quantity that is operated on.

A) If the operands in the expressions are evaluated left to right, then the values of sum1 and sum2 are;

sum1 = (10/2) + 41 = 46

sum2 = 41 + (14/2) = 48

B) If the operands in the expressions are evaluated right to left, then the values of sum1 and sum2 are;

sum1 = (14/2) + 41 = 48

sum2 = 41 + (10/2) = 46

Read more about about Operands at; https://brainly.com/question/27014457

#SPJ1