0是字符串的终止符

# include <stdio.h>
# include <string.h>
# include "myhead.h"
#define ARRAY_SIZE(x) (sizeof(x)/sizeof((x)[0]))

int main(void){

char name[] ="jason";
name[2]=0;//''

printf("name---%s",name);
return 0;
}

原文地址:https://www.cnblogs.com/Peequeue/p/10005597.html