closed by
919 views
0 votes
0 votes
closed with the note: Undefined Behaviour in C is not required for GATE
  1. #include <stdio.h>
  2.     void main()
  3.     {
  4.         int a = -5;
  5.         int k = (a++, ++a);
  6.         printf("%d\n", k);
  7.     }

how to solve this int k = (a++, ++a); expression?

closed by

Related questions

0 votes
0 votes
0 answers
1
Lakshman Bhaiya asked Mar 1, 2018
608 views
#include<stdio.h int main() { int a = 15; printf("%d\n",++a); printf("%d\n",a++); printf("%d\n", a); printf("%d\n",a ); return 0; }16,16,16,1615,13,15,1516,15,14,1416,16,...
1 votes
1 votes
3 answers
2
suneetha asked Aug 22, 2017
2,349 views
#include <stdio.h void main() { int a = 3; int b = ++a + a++ + a; printf("Value of b is %d", b); }after compiling o...
2 votes
2 votes
1 answer
3
Sandeep Suri asked Aug 1, 2017
4,050 views
#include <stdio.h>int main(){ int x = 3;if (x == 2);x = 0;if (x == 3) x++;else x += 2;printf("x = %d", x);return 0;}
0 votes
0 votes
0 answers
4
Arun Rout asked May 30, 2019
289 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...