closed by
364 views
0 votes
0 votes
closed with the note: IT's solved

Consider the following C program. What's the Output and does it depends on the compiler used to run this code?

#include<stdio.h>
int main()
{
    int i = 1;
    printf("%d %d %d\n", i++, i++, i);
    return 0;
}
closed by

1 Answer

Best answer
7 votes
7 votes

This is a compiler dependent questions. The evaluation sequence of printf is undefined in the C-language. 

Start from here to understand the topics. 

selected by

Related questions

0 votes
0 votes
0 answers
4
saurabh111 asked Nov 2, 2018
251 views
in char data type ,plzzz tell me initilization can be seprated from declaration..