Why is this array having all remaining values initialized to zero?

后端 未结 4 1434
难免孤独
难免孤独 2020-12-02 02:39

Hello I am a beginner in C programming language, recently i started learning arrays, I have studied that by default all values in an int ar

4条回答
  •  自闭症患者
    2020-12-02 02:46

    The bit you are missing is that if you initialize just one element of an array, the rest of its elements will be automatically initialized to 0. The language is defined in this way.

提交回复
热议问题