closed by
287 views
0 votes
0 votes
closed as a duplicate of: Undefined Behaviour in C
output is a=34 and x=13 can anyone plzz explain
#include <iostream>
using namespace std;
int main()
{
int x = 10, a;
a = x++ + ++x + x++;
cout << "Post Increment Operation";
cout << "\na = " << a;
cout << "\nx = " << x;
return 0;
}
closed by

Related questions

0 votes
0 votes
0 answers
2
erh asked Feb 9, 2017
636 views
#include <stdio.h>int main(void){int i,j,k,l;i=j=k=l=4;int a=(++i)*(++i)*(++i);int b = (j++)*(j++)*(j++);int c = (k++)*(++k)*(k++);int d = (l++)*(++l)*(++l);printf("%d\t%...