retagged by
3,146 views
3 3 votes

Which of the following is the correct order of evaluation for the below expression? 

$z=x+y^*z/4\%2-1$

  1. $^*/\%+-=$
  2. $=^*/\%+-$
  3. $/^*\%-+=$
  4. $^*\% /-+=$

2 Answers

3 3 votes

precedence order of *,/,% are same and associativity is left to right so */% and similarly for +,- order are same and associativity is left to right and at last = has least precedence among them so it will be evaluated at last.

So (A) should be correct option.

Answer:
Position:
Show:

Related questions

4 4 votes
1 1 answer
1.2k
1.2k views
admin asked Mar 31, 2020
1,213 views
What data structures is used for depth first traversal of a graph?QueueStackListNone of the above
3 3 votes
2 2 answers
4.4k
4.4k views
admin asked Mar 31, 2020
4,350 views
In the ________ traversal we process all of a vertex's descendants before we move to an adjacent vertex.Depth FirstBreadth FirstWidth FirstDepth Limited
4 4 votes
1 1 answer
2.6k
2.6k views
admin asked Mar 31, 2020
2,632 views
The number of unused pointers in a complete binary tree of depth $5$ is:$4$$8$$16$$32$
4 4 votes
4 4 answers
3.2k
3.2k views
admin asked Mar 31, 2020
3,229 views
A ________ is a linear list in which insertions and deletions are made to from either end of the structure.Circular queue.Priority queue.Stack.Dequeue.