+ 3
Initially you did not initialized any value to t. So it may take garbage value in t += a;
On optimized compiler, it takes 0 as default for integer.
+ 1
I don't understand your this query :
If it takes 0, then I should get correct output : yes correct ā
"So it's not the correct logic , I guess??? " : Which logic? Why?