The output of the following code
int k=10;
int g=5;
int s=g+k++;
cout<<s;
is 15
but the output of the following code
int k = 10;
int s= ++k + k++;
cout << s;
is coming as 23. What is the correct explanation? this was doubt number #1
doubt number #2 is
int m = 10;
int n = 10;
int a = 1 + (++m) + (++(++m))++;
int b = (++n) + (++(++n))++;
how is the value of both a and b the same which is 27