char指针和char数组之间有什么区别Like(char * p& char p []) [英] What is the difference between char pointer and char array Like(char *p & char p[])

查看:104
本文介绍了char指针和char数组之间有什么区别Like(char * p& char p [])的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

char指针和char数组之间有什么区别Like(char * p&char p [])

What is the difference between char pointer and char array Like(char *p & char p[])

推荐答案





请看这里:

http://stackoverflow.com/a/ 7564042 [ ^ ]

< a href =http://www.cs.bu.edu/teaching/cpp/string/array-vs-ptr/> http://www.cs.bu.edu/teaching/cpp/string/array- vs-ptr / [ ^ ]

http:// www。 artfulcode.net/articles/pointers-arrays-and-string-literals/ [ ^ ]
Hi,

Have a look here:
http://stackoverflow.com/a/7564042[^]
http://www.cs.bu.edu/teaching/cpp/string/array-vs-ptr/[^]
http://www.artfulcode.net/articles/pointers-arrays-and-string-literals/[^]


char * p是一个指向数组的指针,基本上是32个字节中的4个字节保存数组地址的t操作系统。

char [] p是数组的地址,基本上是数组中第一个元素的地址。
char *p is a pointer that point to an array, basically 4 bytes in 32 bit-operating system which hold the address of an array.
char[] p is the address of an array, basically the address of the first element in the array.


这篇关于char指针和char数组之间有什么区别Like(char * p&amp; char p [])的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆