正在加载图片...
■例如: char str[101, "ps, str= hello!. ERROR/ st是一维数组名,其为地址常量,不能再次赋 值 ps= hello!: /OK/ ps是字符指针,将字符串常量”helo!"赋值给 ps实际上是将该字符串在内存的首地址赋值给 ps◼ 例如: char str[10], *ps; str = “hello!”; /*ERROR*/ str是一维数组名,其为地址常量,不能再次赋 值。 ps = “hello!”; /*OK*/ ps是字符指针,将字符串常量”hello!”赋值给 ps实际上是将该字符串在内存的首地址赋值给 ps
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有