摘要: 原来char *s="123456";与char s[]="123456";是不一样的,在于s所代表的含义不同,前者是一个指向字符串常量的字符指针,后者是数组。虽然大多数时候可以交叉使用,但是今天遇到一个例子: 1 #include <stdio.h> 2 #include <string.h> 3 main() 4 { 5 char *s = "\ta\017bc"; 6 char ss[] = "\ta\017bc"; 7 8 printf("%d\n",sizeof 阅读全文
posted @ 2012-01-05 02:59 cybersword 阅读(302) 评论(2) 推荐(0) 编辑