0 votes 0 votes closed with the note: Undefined Behaviors in C What is the output of the program?? I think the output should be 2 2 1 . But on running the program gives the output 2 3 3 . Pls explain why that output 2 3 3 in details . #include<stdio.h> int main() { int a=1; printf("%d %d %d",a++,++a,a); } Programming in C programming-in-c + – Ajitesh Mandal asked Apr 3, 2017 closed Apr 3, 2017 by rude Ajitesh Mandal 381 views comment Share Follow See all 2 Comments See all 2 2 Comments reply Ajitesh Mandal commented Apr 3, 2017 reply Follow Share Undefined Behaviors in C .What does it mean?? 0 votes 0 votes s9k96 commented Apr 3, 2017 reply Follow Share Usually these are evaluated from right to left and printed left to right. but it is dependent on the compiler and version you are using. so this is undefined as a general C question. 1 votes 1 votes Please log in or register to add a comment.