c[5]={0}相当于把c[5]整个数组都初始化吗?
c[5]={0}相当于把c[5]整个数组都初始化吗?这样真的行吗?求真相
int main( void )
{
int c[5] = {0};
return 0;
}
产生的汇编:
.file "test.c"
.text
.globl main
.type main, @function
main:
leal 4(%esp), %ecx
andl $-16, %esp
pushl -4(%ecx)
pushl %ebp
movl %esp, %ebp
pushl %ecx
subl $32, %esp
/*
movl $0, -24(%ebp)
movl $0, -20(%ebp)
movl $0, -16(%ebp)
movl $0, -12(%ebp)
movl $0, -8(%ebp)
*/这五句就是在赋值,全部赋值成0
movl $0, %eax