• Cursussen
  • Code Compiler
  • Discussiëren
  • Prijzen
  • Teams
Menu
+ 1

Using a while Loop

int num = 1; int number; int total ; while (num <= 2) { cin >> number; total += number; num++; } cout << total << endl; If the int total is not declare as 0, what will happen?

c++else-statements
8th Apr 2018, 8:56 PM
xin zhang
xin zhang - avatar
1 Antwoord
+ 4
https://stackoverflow.com/questions/1597405/what-happens-to-a-declared-uninitialized-variable-in-c-does-it-have-a-value?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa
8th Apr 2018, 8:58 PM
Ariela
Ariela - avatar

Heb je vaak vragen zoals deze?

Leer efficiënter, gratis:

  • Inleiding tot Python

    7,1 miljoen leerlingen

  • Inleiding tot Java

    4,7 miljoen leerlingen

  • Inleiding tot C

    1,5 miljoen leerlingen

  • Inleiding tot HTML

    7,5 miljoen leerlingen

Bekijk alle cursussen
Populair vandaag
Guys I don't know anything about cooding who can help me pls
1 Votes
Why can’t I use double “ in python?
1 Votes
What do you think of this code and what are your suggestions for developing and modifying it?, How can I develop myself more?
1 Votes
Coding for Cybersecurity
1 Votes
Need help
1 Votes
Pointers in c#
1 Votes
You’re free to give me your advice! 🚨
1 Votes
Decorators in python.
2 Votes
Salut tout le monde
1 Votes
Please click me
0 Votes