+ 1
Quick help needed in C!
7 Respuestas
+ 2
It's not (int a, int b) ; it's just a sequence of instructions enclosed in a paranthesis.. Just same as comma separated instructions..
Sequentially instructions are executed each return a result into lvalue(left opearand)..
Like : int num = ( 1,2,3,4,5) ; 5 is assigned into num. 1,2,3,4 are return but replaced by 5 at last. So no use of 1,2,3,4
But ( a++, ++a) here a++ executed first then ++a so it has some result produced. And last value of a is returned to lvalue....
+ 1
a=-5;
(a++, ++a) ;
a++ cause a = -4
++a cause a = -3
And it is assinged to k
So it output -3
Mention details about what help you need...
Is this what you looking..
+ 1
Jayakrishna🇮🇳 My question is in the code. I copied this code from a question here on SoloLearn and I was wondering what (int a, int b) operator does, or if it is an operator at all. I’ve never encountered such syntax.
+ 1
Boris Zugic int a, int b refer to two different variables a and b of Datatype integer. In that Code could we Set the variable a as a++, and b as ++a.
Also so:
Int a = a++
Int b = ++a // a after a++
edit: Look bellow Jayakrishna🇮🇳 gave the answer.
+ 1
Jayakrishna🇮🇳 Thank you very much!
0
Boris Zugic forgotton semicolon in Line 8.
0
You're welcome..