• Курсы
  • Компилятор кода
  • Обсуждения
  • Цены
  • 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 ответ
+ 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

Часто задают такие вопросы?

Учитесь эффективнее, бесплатно:

  • Введение в Python

    7.1M учащихся

  • Введение в Java

    4.7M учащихся

  • Введение в C

    1.5M учащихся

  • Введение в HTML

    7.5M учащихся

Смотреть все курсы
Актуальное сегодня
Python Developer
0 Votes
hi my coding instor told me to make a calculator that find the average of two numbers can you pls tell me my erro
0 Votes
Question
1 Votes
Hi guys I need some one to teach the String name how I can do it true because when I finish coding they give me NO OUTPUT
1 Votes
Wayss
0 Votes
generic programming understanding memory ownership
0 Votes
fully dynamic arrays
1 Votes
I dont now that how to do js
2 Votes
Can someone help with teaching me this coding of a thing
0 Votes
Python
1 Votes