int(3) Invalid syntax in C. You could write it like this:
printf("\n a = %d", a),(int)3;
or even just:
printf("\n a = %d", a),3;
and this will be compiled in both C and C ++.
Note that the comma between printfand the redundant expression following it is only a comma . The results of both the printf call and the next expression are discarded.