Problem 3) Let the function fun be defined as: int fun (int k) { *k += 6; return 4 * (**); } Suppose fun is used in a pr

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
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 * (**); } Suppose fun is used in a pr

Post by answerhappygod »

Problem 3 Let The Function Fun Be Defined As Int Fun Int K K 6 Return 4 Suppose Fun Is Used In A Pr 1
Problem 3 Let The Function Fun Be Defined As Int Fun Int K K 6 Return 4 Suppose Fun Is Used In A Pr 1 (60.24 KiB) Viewed 28 times
Let the function fun be defined as:
Suppose fun is used in a program as follows:
void main(){ inti=10,j= 20, sum1, sum2; sum1 = (i / 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?
Problem 3) Let the function fun be defined as: int fun (int k) { *k += 6; return 4 * (**); } Suppose fun is used in a program as follows: void main() { int i = 101 j = 20, sumi, sum2; suml = (i / 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!
Post Reply