Message from C, C++ discussions

December 2019

— Another one bites the dust...!
Banned Farhan.
Reason:
channel ad

— 

Void main()
{
Int k=8,m=7;
K<m?k++:m=m+1;
Printf("%d",k);
}
Can anybody tell y we got complile time error in dis quest..

— Which error?

— Actually I didn't execute it..I found dis on some website nd d ans is compile time error dats d reason y i asked it..

Message permanent page

— Write in a readable way

— Well, try to compile it 🤷‍♂

— I thing you should not add commas between 8 and m=7 it should be semicolon

— Simultaneous declaration of variable is not allowed if I am right

— That part isn't wrong

— I don't even know if it's C or Cpp

— (Initial values of a=1,b=2,c=1)
c += (-c) ? a : b;
How d final value of c would be 2 in dis question..??

Message permanent page

— If the expression is true then the value of c will be a otherwise it will be b