I wanna understand it। | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

I wanna understand it।

What is the output of code? ithisnt a=1; for(int i=0;i<20;i++) { a++; } cout<<a;

30th Aug 2020, 3:17 PM
Bayzid
Bayzid - avatar
2 Réponses
+ 3
run the code and getto know the output https://code.sololearn.com/#cpp
30th Aug 2020, 3:22 PM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
+ 1
It's 21, because you're applying a unit increment to a for 20 times
30th Aug 2020, 3:23 PM
Gabriele
Gabriele - avatar