alguien me puede ayudar con esto? | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

alguien me puede ayudar con esto?

Cual es la salida del siguiente código? Int a=3; Int b=2; b=a++; cout<<++b; Vi la respuesta pero no la entendí Estoy aprendiendo desde cero

22nd Feb 2020, 6:32 PM
Jessica
1 Réponse
+ 1
In the first passage, there is : b = a ++; ( b is equal to a and, after that, a is equal to a + 1) So b = 3 and a = 4 Then there is : cout<<++b; (means that the output is equal to b + 1) So the output is b + 1 --> 3 + 1 = 4
22nd Feb 2020, 9:00 PM
Edoardo Doccini
Edoardo Doccini - avatar