Ask Question
22 May, 03:53

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

+1
Answers (1)
  1. 22 May, 07:51
    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?
Find 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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers