LinuxC:sizeof,strlen

来源:互联网 发布:火牛抢购软件好吗 编辑:程序博客网 时间:2024/06/01 07:33

 

 

output:

a[]:10 sizeof(str):4 strlen:9

sizeof:计算所占的内存空间,用字节数表示。

strlen:

The  strlen()  function  calculates  the  length  of  the string s, not   including the terminating '/0' character.