Yes i Output should be 6 and 4 in first case when a*++a here highest priority of multiplication operator so when we calculate a=2 a*++a next a is increase by 1 2*++a here second a will increase 2*3=6 but if there is + operator in place of multiplication then first increment will solve then incremet value will use in all expression. In second case you use post increment so first expression will calculate and it will assign to variable then c variable will increase. sometimes Compiler will give different results for such types of calculations c=++a + ++a+ a++; this will give different result on different ide . so avoid these calculations from your program
Hanane this is depend on Compiler or ide you will get different different ide . Try same thing in java . Java will give you warnings to avoid this type of calculation if you want to understood than you can read about calculation of increment and decrement.
That's why the compiler warns you that operations on these may be undefined.