Determining subroutine argument evaluation order [duplicate]
问题 This question already has answers here : Why are these constructs using pre and post-increment undefined behavior? (14 answers) Closed last year . I am writing a program in C that determines the order in which subroutine arguments are evaluated. What I have so far is the following: int i=1; printf("%d %d %d\n", i++, i++, i); but I'm not sure If I am on the correct path or would it be easier to write in a different language like Ruby. How can I write a program in C (or Ruby) that determines