Difference between pointer and array
来源:互联网 发布:湖北网络爆料平台 编辑:程序博客网 时间:2024/06/06 01:29
逛stackoverflow无意发现的,很常见的错误,自己就曾迷糊过,你是否也曾犯过?:-)
Can anybody tell me difference between the bellow statements?
ANS:When you declare char p[] you are declaring an array of chars (which is accessible to be both read and written), and this array
is initialized to some sequence of characters i.e. "This is test" is copied to the elements in this array.
When you declare char* p, you are declaring a pointer that points directly to some constant literal - not a copy. These can only
be read.
- Difference between pointer and array
- The difference between pointer and array
- the difference between pointer and array (and variable)
- Difference between string created by array and pointer
- 引用和指针的区别 Difference between pointer and reference
- more effective c++:the difference between pointer and reference
- The difference between (()) and ().
- difference between "<" and "<<"
- 空悬指针和野指针的区别(the difference between dangling pointer and wild pointer)
- What’s the difference between “Array()” and “[]” while declaring a JavaScript array?
- Difference Between typedef and #define
- Difference between PCDATA and CDATA
- Difference between CComPtr and CComQIPtr
- Difference between RVCT and GCCE
- Difference between RVCT and GCCE
- difference between slist and list.
- difference between stack and heap
- Difference between replace and translate
- 依赖注入&控制反转 IoC 容器和Dependency Injection 模式
- 什么是面向对象思想
- 浅析架构之 Videologger(二)
- Linux Audio ALSA Technical specification(Linux 音频ALSA技术说明)
- 查看时间调用函数
- Difference between pointer and array
- 突破Linux内核模块校验机制
- 远方的桃园
- 刚才写的不太具体。。。属于笔随心动。
- 分散加载文件及其应用(重点必看)
- [转]20110324-C++的iostream标准库介绍(2)
- 黑马程序员Java培训、Android培训-Java 学习过程记录_面向对象下3
- 小技巧:如何令Edit Control滚动到最新的输出行
- 计算机专业学生的疯狂咆哮~学计算机的伤不起啊~