Problem 3) Let the function fun be defined as: int fun (int k) { *k += 6; return 4* (*k); } Suppose fun is used in a pro
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Problem 3) Let the function fun be defined as: int fun (int k) { *k += 6; return 4* (*k); } Suppose fun is used in a pro
Problem 3) Let the function fun be defined as: int fun (int k) { *k += 6; return 4* (*k); } Suppose fun is used in a program as follows: void main() { int i = 10, j = 20, sum1, sum2; sum1 = (1/2) + fun (&i); sum2 fun (&j) + (j / 2); } What are the values of sum1 and sum2 if a) operands in the expressions are evaluated left to right? b) operands in the expressions are evaluated right to left?
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!