Consider the following C program: int fun( int *i){ *i +=5; return 4; } void mai
ID: 3616231 • Letter: C
Question
Consider the following C program: int fun(int *i){ *i +=5; return 4; } void main () { int x=3; x=x +fun (&x); } What is the value of x after the assignment statement in main,assuming a. operands are evaluated left to right. b. operands are evaluated right to left. Consider the following C program: int fun(int *i){ *i +=5; return 4; } void main () { int x=3; x=x +fun (&x); } What is the value of x after the assignment statement in main,assuming a. operands are evaluated left to right. b. operands are evaluated right to left.Explanation / Answer
int fun(int *i){ *i +=5; return 4; } void main () { int x=3; x=x +fun (&x); } What is the value of x after the assignment statement in main,assuming a. operands are evaluated left to right.x infun i
3+4
8 3
8
x=7 x gets change to 8 after x=x+
b. operands are evaluated right to left.
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.