Ask Question
29 June, 09:44

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

+4
Answers (1)
  1. 29 June, 10:30
    0
    a. operands are evaluated left to right

    7

    b. operands are evaluated right to left

    12

    Explanation:

    for a

    x value is 3 and function returning 4 so total 7

    for b

    function value returning 4 and it also changes x value to 8

    so when we add both it is 12
Know the Answer?
Not Sure About the Answer?
Get an answer to your 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 ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers