Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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.
18th Sep 2022, 2:25 PM
Jayakrishna 🇮🇳
+ 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?
18th Sep 2022, 8:28 PM
Jayakrishna 🇮🇳