edited by
363 views
3 votes
3 votes
I read Dennis Ritchie and i am little bit confused abt some Concepts on Pointers:-

 Two Complicated Declarations which I didnt get:-

1. char (*(*x())[])() :-

x = Function returning pointer to array[] of pointer to function returning char.

2. char(*(*X[3])())[5] :-

X = array[3] of pointer to function returning pointer to array[5] of char.
edited by

1 Answer

3 votes
3 votes

Why "P = &A" is used instead of "P = A"??

Because, that can only be used had A itself was a pointer. To to that, you have to declare A as

int *A;
A = malloc(13*sizeof(int))
P = A

And Two Complicated Declarations which I didnt get:- 

char (*(*x())[])() :- 

x is a function returning pointer to array of pointers to functions returning char

char(*(*X[3])())[5] :- 

X is an array (of size 3) of pointers to function returning pointers to array of 5 characters.

Related questions

3 votes
3 votes
3 answers
1
Laxman Ghanchi asked May 19, 2023
1,111 views
#include<stdio.h void print(int n) { printf("Hello "); if(n++ == 0) return ; print(n); n++; } int main() { void print(); print(-4); }How many times printf execute?? And H...
0 votes
0 votes
1 answer
2
Laxman Ghanchi asked May 19, 2023
656 views
#include<stdio.h>void print(int n){ printf("Hello "); if(n++ == 0) return ; print(n); n++;}int main(){ void print(); print(-4);}