4
A
回答
10
第一个是单指针〜8点的整数的数组,而第二个是8的阵列指针,各为整数。
如果你只踢了cdecl
,这是美妙的这样的事情:
pax$ cdecl
Type `help' or `?' for help
cdecl> explain int (*p)[8];
declare p as pointer to array 8 of int
cdecl> explain int *p[8];
declare p as array 8 of pointer to int
cdecl> explain char*(*fp[])(int,float*);
declare fp as array of pointer to function (int, pointer to float)
returning pointer to char
实际上,有一个clockwise/spiral rule,你可以用它来做到这一点在你的脑袋,但我没有,因为担心该我发现cdecl
,出于同样的原因,我不再将大的任意32位数字从十进制转换为十六进制在我的头上 - 我如果我必须但可以用更容易---)
+0
我其实更喜欢C,因为它通常比英语更清晰(可能因为我不是母语)。 – AoeAoe 2012-03-15 21:37:37
4
第一p是一个指针,指向8 int数组。 第二个p是8个指向int的指针的数组。
+4
+1另外**数组不是指针,指针也不是数组** :) ... @Hanafuda:阅读[c-faq](http://c-faq.com/)的第6部分... *欢迎来到SO *。 – pmg 2011-06-01 14:01:04
相关问题
- 1. x = * p ++和* p ++; x = * p in c有什么区别?
- 2. C++中char * p和const char * p有什么区别?
- 3. 区别<p>是什么Javascript和ASP.net有什么区别?</p>
- 4. $('。p')和$('p')jquery之间有什么区别?
- 5. 函数中* p和(* p)[3]之间的区别是什么?
- 6. int(1)和int(8)有什么区别?
- 7. Java 8:Instant和LocalDateTime有什么区别?
- 8. java 8 ZonedDateTime和OffsetDateTime有什么区别?
- 9. p :: first-letter和p :: first-letter之间的区别是什么?
- 10. * p [5]和(* p)[5]之间的区别是什么?
- 11. '%p'和'my%p'之间的区别?
- 12. 2 [p]和6 [p]是什么意思?
- 13. 区域设置有什么区别:zh_CN,zh_CN.utf8和zh_CN.UTF-8
- 14. 区别<p>是什么NUnit的和NUnit.Runner包之间的区别吗?</p>
- 15. 函数定义中的指针与数组:void fct1(int * p)和void fct1(int p [])有什么区别?
- 16. 为什么p大于p?
- 17. int * p和int * p声明之间的区别
- 18. int p = *(int *)i和int p = *(int *)&i之间的区别
- 19. UTF-8和HTML实体有什么区别?
- 20. Windows 8中Password Vault和Credential Manager之间的区别是什么?
- 21. 什么是什么是一个使用</p> <p><code>javac -cp classes helloworld.java</code></p> <p>和</p> <p><code>javac -classpath classes helloworld.java</code></p> 在CMD <p>的区别-cp和-classpath
- 22. set/P if语句错误(windows 8)
- 23. printf中%c和%C有什么区别?
- 24. 在IE 6/7/8:HTML插入<p></p>(用jQuery)不符合设置的<p></p>
- 25. IE 7和IE 8之间的html渲染区别是什么?
- 26. C++中#import和#include有什么区别?
- 27. C中#define和'='有什么区别?
- 28. C#中CLR和DLR有什么区别?
- 29. Webpack中的-p是什么?
- 30. Ruby中的“p”是什么?
http ://cdecl.org/是你的朋友。 – 2011-06-01 13:50:59