Difference between revisions of "C programming/pointers"

From Teknologisk videncenter
Jump to: navigation, search
m (Created page with "=Review of C Pointer Declarations= {| |- | int *p ||p is a pointer to int |- | int *p[13] ||p is an array[13] of pointer to int |- | int *(p[13]) ||p is an array[13] of pointer t...")
 
m (added Category:C using HotCat)
Line 21: Line 21:
 
|-
 
|-
 
|}
 
|}
 +
 +
[[Category:C]]

Revision as of 12:46, 23 May 2015

Review of C Pointer Declarations

int *p p is a pointer to int
int *p[13] p is an array[13] of pointer to int
int *(p[13]) p is an array[13] of pointer to int
int **p p is a pointer to a pointer to an int
int (*p)[13] p is a pointer to an array[13] of int
int *f() f is a function returning a pointer to int
int (*f)() f is a pointer to a function returning int
int (*(*f())[13])() f is a function returning ptr to an array[13] of pointers to functions returning int
int (*(*x[3])())[5] x is an array[3] of pointers to functions returning pointers to array[5] of ints