0

How this code is printing 4 as output?

#include <stdio.h> int func(int a, int b, int c); int main(void) { int x; x=func(2,3,4); printf("%d\n",x); return 0;} int func(int a, int b, int c) { return a, b, c; }

30th Aug 2019, 1:20 PM
Preity
Preity - avatar
1 Odpowiedź
+ 1
The comma operator evaluates all the operands and returns his rightmost evaluation.
30th Aug 2019, 3:41 PM
Miquel Andreu Fuster Sancho
Miquel Andreu Fuster Sancho - avatar