Question
Parenthesise the following C statement for its proper evaluation.
x + = a%b + c ∗ d/e ! = f + + − g
Further, if all the variables from a to g are initialised by 2, then what will be the value of x?
Answer :
Word Count : 199
___ ___ _______ ____ ___ ____ _______.
_______ _____ _____ ________ ________ _____.
___ _________ ______ _________ _________ ____ _______ _________ ___ _______ ___ __________.
_____ ______ ___ __________ _________ ____.
____ _________ __________ _________ ____.
____ ___ _____ ________ _______ __________ ____ ___ ________ __________.
________ _________ ________ _________ _______ ____ ______ __________ ____ __________ ____.
___ ________ ____ __________ _________ _______.
_______ _________ ________ _________ ___ __________ ________ ___ ____.
________ _______ __________ ___ __________ ___ _______ __________ ______ ______.
__________ ______ __________ ____ __________ __________ ______ ______ ___.
__________ __________ ________ ______ ____ _____ _______ _______ ________ ___.
_____ ___ ____ _______ _______ _______ ______ __________ _____ ____ _______ ________.
_________ _____ _______ _____ ____ _______.
_______ ____ _________ ______ ______ ________ _______ _________ _________.
____ _________ ___ _______ _______ _____ __________ _______.
____ _________ ____.
Skip in 10
(((x += (((a % b) + ((c * d) / e))) != (f++ - g))))
Now, let's evaluate the expression step by step with all variables initialized to 2:
Given:
a = 2, b = 2, c = 2, d = 2, e = 2, f = 2, g = 2
-
Modulo operation:
a%b=2%2=0a \% b
_______ _____ _____ ________ ________ _____.
___ _________ ______ _________ _________ ____ _______ _________ ___ _______ ___ __________.
_____ ______ ___ __________ _________ ____.
____ _________ __________ _________ ____.
____ ___ _____ ________ _______ __________ ____ ___ ________ __________.
________ _________ ________ _________ _______ ____ ______ __________ ____ __________ ____.
___ ________ ____ __________ _________ _______.
_______ _________ ________ _________ ___ __________ ________ ___ ____.
________ _______ __________ ___ __________ ___ _______ __________ ______ ______.
__________ ______ __________ ____ __________ __________ ______ ______ ___.
__________ __________ ________ ______ ____ _____ _______ _______ ________ ___.
_____ ___ ____ _______ _______ _______ ______ __________ _____ ____ _______ ________.
_________ _____ _______ _____ ____ _______.
_______ ____ _________ ______ ______ ________ _______ _________ _________.
____ _________ ___ _______ _______ _____ __________ _______.
____ _________ ____.
IGNOU ACADEMY
Your IGNOU journey, made easier.
- Solved Assignments
- Study Notes
- Guess Papers
- Question Papers
Continue Reading — It's Free
Sign in with Google to unlock more of this answer.
✓ Free access
✓ Unlock up to 60% of the answer
✓ No payment required
✓ Unlock up to 60% of the answer
✓ No payment required
Quick Google sign-in. No separate registration form.