Home / C Programming / Expressions :: Discussion

Discussion :: Expressions

  1. Which of the following is the correct order of evaluation for the below expression?
    z = x + y * z / 4 % 2 - 1

  2. A.
    * / % + - =
    B.
    = * / % + -
    C.
    / * % - + =
    D.
    * % / - + =

    View Answer

    Workspace

    Answer : Option A

    Explanation :

    C uses left associativity for evaluating expressions to break a tie between two operators having same precedence.


Be The First To Comment