Is it necessary to initialize array with zero? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

Is it necessary to initialize array with zero?

It's showing 64 at index 2 otherwise everything is perfect!!! https://code.sololearn.com/ccdiRpXzP4L1/?ref=app https://code.sololearn.com/ccdiRpXzP4L1/?ref=app

30th Mar 2023, 5:21 AM
Yash Pandya
1 ответ
+ 6
Yash Pandya when you declare a C variable you get out of it whatever you put into it. If you never give it an initial value then you get whatever happens to be in memory where it is allocated.
30th Mar 2023, 5:40 AM
Brian
Brian - avatar