c语言数组类型默认值(c99)


#include <stdio.h>
#include <stdlib.h>

int main() {
    int arr[6] = {0}; //每个值默认0
    for(int i = 0; i < len; i ++)
        printf("%d\n",arr[i]);
    return 0;
}
输出
========================================
0 0 0 0 0 0

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM