• 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
What coding language should i use to make a custom coding language?
0 Votes
Hello! I’m 15 and I want to learn programming to become a web developer. Any advice?
0 Votes
help string permutation
0 Votes
Any easy game ideas for beginners?
0 Votes
Which is more important CSS vs HTML vs JS?
1 Votes
Code is wrong somehow, I need help!
0 Votes
APP FREEZING
0 Votes
Newb
0 Votes
How many courses are there on Sololearn
1 Votes
Is the Python Developer course the final course of Python?
0 Votes