#include <stdio.h>;#include <string.h>;int main(int argc,char** argv){ char s1[] = "abcd0xyz"; printf("s1 is %s\n",s1); char s2[] = "abcd\0xyz"; printf("s2 is %s\n",s2); return 0;}结束符'\0'和0不是一样么,那为什么s1输出的是abcd0xyz而不是abcd????
讲详细点,谢谢