retagged by
636 views
0 votes
0 votes
closed with the note: Undefined Behaviour. See here: https://gateoverflow.in/62411/undefined-behaviour-in-c

#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%d\t%d\t%d",a,b,c,d);

return 0;

}

Please explain the output. Thanks in advance.

The output is:

252    64    125   150

retagged by

Related questions

0 votes
0 votes
0 answers
2
Arun Rout asked May 30, 2019
287 views
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...
0 votes
0 votes
0 answers
4
Vikas123 asked Jan 8, 2019
718 views
Acc. to (question) my solution is...uniquely constructed binary tree PRE+POST and IN+POST…where i am wrong….