C语言面试随笔

 char c[] = "abc";
 cout<<sizeof(c)<<endl;//输出4
 cout<<strlen(c)<<endl;//输出3

字符数组系统会自动在字符串常量自动加一个‘\0’

C++ sizeof的使用总结

http://blog.csdn.net/candyliuxj/article/details/6307814

C语言变量的类型和存储位置

http://blog.csdn.net/chenjin_zhong/article/details/12027615

posted @ 2014-04-25 18:57  ONWAYO  阅读(119)  评论(0编辑  收藏  举报