C-Simple-Types-Pointers
char a = ‘A’; char *p = &a; char **q = &p; char ***r = &q;
Sl.No |
Synonyms |
Rule applied |
Memory or Value |
sizeof() |
Actual arguements |
Formal arguements |
1 |
p, &a |
Memory |
8 |
fun(&a) or fun(p) |
void fun(char *x) |
|
2 |
q, &p |
Memory |
8 |
fun(q) or fun(&p)) |
void fun(char **q) |
|
3 |
r, &q |
Memory |
8 |
fun(r) or fun(&q) |
void fun(char ***r) |
|
4 |
a, *p, p[0] |
Value |
1 |
fun(a) or fun(*p) or fun(p[0]) |
void fun(char a) |
|
5 |
a, **q, *q[0], q[0][0] |
Value |
1 |
fun(**q) or fun(*q[0]) or fun(q[0][0]) |
void fun(char a) |
|
6 |
a, ***r, **r[0], *r[0][0], r[0][0][0] |
Value |
1 |
fun(***r) or fun(**r[0]) or fun(*r[0][0] or fun(r[0][0][0])) |
void fun(char a) |
|
7 |
*q, q[0], **r, *r[0], r[0][0], &a, p |
Memory |
8 |
fun(*q) or fun(q[0] or fun(**r) or fun(*r[0]) or fun(r[0][0])) |
void fun(char *p) |
|
8 |
q, *r, r[0], &p |
Memory |
8 |
fun(q) or fun(*r) or fun(r[0] of fun(&p)) |
void fun(char **q) |
int a = ‘A’; int *p = &a; int **q = &p; int ***r = &q;
Sl.No |
Synonyms |
Rule applied |
Memory or Value |
sizeof() |
Actual arguements |
Formal arguements |
1 |
p, &a |
Memory |
8 |
fun(&a) or fun(p) |
void fun(int *x) |
|
2 |
q, &p |
Memory |
8 |
fun(q) or fun(&p)) |
void fun(int **q) |
|
3 |
r, &q |
Memory |
8 |
fun(r) or fun(&q) |
void fun(int ***r) |
|
4 |
a, *p, p[0] |
Value |
4 |
fun(a) or fun(*p) or fun(p[0]) |
void fun(int a) |
|
5 |
a, **q, *q[0], q[0][0] |
Value |
4 |
fun(**q) or fun(*q[0]) or fun(q[0][0]) |
void fun(int a) |
|
6 |
a, ***r, **r[0], *r[0][0], r[0][0][0] |
Value |
4 |
fun(***r) or fun(**r[0]) or fun(*r[0][0] or fun(r[0][0][0])) |
void fun(int a) |
|
7 |
*q, q[0], **r, *r[0], r[0][0], &a, p |
Memory |
8 |
fun(*q) or fun(q[0] or fun(**r) or fun(*r[0]) or fun(r[0][0])) |
void fun(int *p) |
|
8 |
q, *r, r[0], &p |
Memory |
8 |
fun(q) or fun(*r) or fun(r[0] of fun(&p)) |
void fun(int **q) |
float a = ‘A’; float *p = &a; float **q = &p; float ***r = &q;
Sl.No |
Synonyms |
Rule applied |
Memory or Value |
sizeof() |
Actual arguements |
Formal arguements |
1 |
p, &a |
Memory |
8 |
fun(&a) or fun(p) |
void fun(float *x) |
|
2 |
q, &p |
Memory |
8 |
fun(q) or fun(&p)) |
void fun(float **q) |
|
3 |
r, &q |
Memory |
8 |
fun(r) or fun(&q) |
void fun(float ***r) |
|
4 |
a, *p, p[0] |
Value |
4 |
fun(a) or fun(*p) or fun(p[0]) |
void fun(float a) |
|
5 |
a, **q, *q[0], q[0][0] |
Value |
4 |
fun(**q) or fun(*q[0]) or fun(q[0][0]) |
void fun(float a) |
|
6 |
a, ***r, **r[0], *r[0][0], r[0][0][0] |
Value |
4 |
fun(***r) or fun(**r[0]) or fun(*r[0][0] or fun(r[0][0][0])) |
void fun(float a) |
|
7 |
*q, q[0], **r, *r[0], r[0][0], &a, p |
Memory |
8 |
fun(*q) or fun(q[0] or fun(**r) or fun(*r[0]) or fun(r[0][0])) |
void fun(float *p) |
|
8 |
q, *r, r[0], &p |
Memory |
8 |
fun(q) or fun(*r) or fun(r[0] of fun(&p)) |
void fun(float **q) |
double a = ‘A’; double *p = &a; double **q = &p; double ***r = &q;
Sl.No |
Synonyms |
Rule applied |
Memory or Value |
sizeof() |
Actual arguements |
Formal arguements |
1 |
p, &a |
Memory |
8 |
fun(&a) or fun(p) |
void fun(double *x) |
|
2 |
q, &p |
Memory |
8 |
fun(q) or fun(&p)) |
void fun(double **q) |
|
3 |
r, &q |
Memory |
8 |
fun(r) or fun(&q) |
void fun(double ***r) |
|
4 |
a, *p, p[0] |
Value |
8 |
fun(a) or fun(*p) or fun(p[0]) |
void fun(double a) |
|
5 |
a, **q, *q[0], q[0][0] |
Value |
8 |
fun(**q) or fun(*q[0]) or fun(q[0][0]) |
void fun(double a) |
|
6 |
a, ***r, **r[0], *r[0][0], r[0][0][0] |
Value |
8 |
fun(***r) or fun(**r[0]) or fun(*r[0][0] or fun(r[0][0][0])) |
void fun(double a) |
|
7 |
*q, q[0], **r, *r[0], r[0][0], &a, p |
Memory |
8 |
fun(*q) or fun(q[0] or fun(**r) or fun(*r[0]) or fun(r[0][0])) |
void fun(double *p) |
|
8 |
q, *r, r[0], &p |
Memory |
8 |
fun(q) or fun(*r) or fun(r[0] of fun(&p)) |
void fun(double **q) |
struct ABC { int x; int y; } a; struct ABC *p = &a; struct ABC **q = &p; struct ABC ***r = &q;
Sl.No |
Synonyms |
Rule applied |
Memory or Value |
sizeof() |
Actual arguements |
Formal arguements |
1 |
p, &a |
Memory |
8 |
fun(&a) or fun(p) |
void fun(struct ABC *x) |
|
2 |
q, &p |
Memory |
8 |
fun(q) or fun(&p)) |
void fun(struct ABC **q) |
|
3 |
r, &q |
Memory |
8 |
fun(r) or fun(&q) |
void fun(struct ABC ***r) |
|
4 |
a, *p, p[0] |
Value |
8 |
fun(a) or fun(*p) or fun(p[0]) |
void fun(struct ABC a) |
|
5 |
a, **q, *q[0], q[0][0] |
Value |
8 |
fun(**q) or fun(*q[0]) or fun(q[0][0]) |
void fun(struct ABC a) |
|
6 |
a, ***r, **r[0], *r[0][0], r[0][0][0] |
Value |
8 |
fun(***r) or fun(**r[0]) or fun(*r[0][0] or fun(r[0][0][0])) |
void fun(struct ABC a) |
|
7 |
*q, q[0], **r, *r[0], r[0][0], &a, p |
Memory |
8 |
fun(*q) or fun(q[0] or fun(**r) or fun(*r[0]) or fun(r[0][0])) |
void fun(struct ABC *p) |
|
8 |
q, *r, r[0], &p |
Memory |
8 |
fun(q) or fun(*r) or fun(r[0] of fun(&p)) |
void fun(struct ABC **q) |
union ABC { int x; int y; } a; union ABC *p = &a; union ABC **q = &p; union ABC ***r = &q;
Sl.No |
Synonyms |
Rule applied |
Memory or Value |
sizeof() |
Actual arguements |
Formal arguements |
1 |
p, &a |
Memory |
8 |
fun(&a) or fun(p) |
void fun(union ABC *x) |
|
2 |
q, &p |
Memory |
8 |
fun(q) or fun(&p)) |
void fun(union ABC **q) |
|
3 |
r, &q |
Memory |
8 |
fun(r) or fun(&q) |
void fun(union ABC ***r) |
|
4 |
a, *p, p[0] |
Value |
4 |
fun(a) or fun(*p) or fun(p[0]) |
void fun(union ABC a) |
|
5 |
a, **q, *q[0], q[0][0] |
Value |
4 |
fun(**q) or fun(*q[0]) or fun(q[0][0]) |
void fun(union ABC a) |
|
6 |
a, ***r, **r[0], *r[0][0], r[0][0][0] |
Value |
4 |
fun(***r) or fun(**r[0]) or fun(*r[0][0] or fun(r[0][0][0])) |
void fun(union ABC a) |
|
7 |
*q, q[0], **r, *r[0], r[0][0], &a, p |
Memory |
8 |
fun(*q) or fun(q[0] or fun(**r) or fun(*r[0]) or fun(r[0][0])) |
void fun(union ABC *p) |
|
8 |
q, *r, r[0], &p |
Memory |
8 |
fun(q) or fun(*r) or fun(r[0] of fun(&p)) |
void fun(union ABC **q) |