LearnFrenzy
Sign in Take a free test

Functions · Function Basics MCQ · Question 6

Order of evaluation of function arguments in C Answer, explanation & discussion

  • MCQ
  • Medium
  • 0 comments
  • Answer explained
  • Moderated community
Question 6 Back to Exercise

In which order are the arguments of f(a(), b()) evaluated?

  • A Left to right
  • B Right to left
  • C Unspecified – the compiler may choose Correct
  • D Both at the same time
Correct Answer: Option C

The C standard leaves the order unspecified. Code whose result depends on it, such as printf("%d %d", next(), next()), may print differently on different compilers. Call the functions in separate statements.

Discussion & Comments 0

Share your method, a shortcut, or ask about a step you didn't follow.

No comments yet. Be the first to share your solution!

Post your comment

Comments appear after a quick review by our team.

Popular