• Kursy
  • Kompilator kodu
  • Dyskusja
  • Cennik
  • Zespoły
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 Odpowiedź
+ 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

Często masz takie pytania?

Ucz się bardziej efektywnie, za darmo:

  • Wprowadzenie do Pythona

    7.1M uczących się

  • Wprowadzenie do Java

    4.7M uczących się

  • Wprowadzenie do C

    1.5M uczących się

  • Wprowadzenie do HTML

    7.5M uczących się

Zobacz wszystkie kursy
Popularne dzisiaj
Python coding help
1 Votes
Cities Sylines AI Model Clima 1.0
0 Votes
Comparing Lambda with ES6
3 Votes
What company hired front-end developer after taking course in their website?
0 Votes
What are the best things to practice for better logic building?
0 Votes
Gide me the path of Cyber security
1 Votes
Python project
1 Votes
What music should i listen to while i code?
0 Votes
System designed to help
1 Votes
certificate
0 Votes