Programovanie v jazyku C++


0101 Dátové typy

Pokúste sa zdôvodnit správnost alebo nesprávnost deklarácií uvedených v tabulke.
 
 
int i;  An int 
int *p;  A pointer to an int
int a [];  An array of int
int f () ;  A function returning an int 
int **pp;  A pointer to a pointer to an int 
int (*pa) [];  A pointer to an array of int
int ( *pf) () ;  A pointer to a function returning an int
int *ap [];  An array of pointers to int
int aa [] [];  An array of arrays of int
int af [] () ;  An array of functions returning ints (ILLEGAL) 
int* fp ();  A function returning a pointer to an int
int fa () [];  A function returning an array of ints (ILLEGAL) 
int ff () ();  A function returning a function returning an int (ILLEGAL) 
int ***ppp;  A pointer to a pointer to a pointer to an int
int (**ppa) [];  A pointer to a pointer to an array of int
int (**ppf) () ;  A pointer to a pointer to a function returning an int
int *(*pap) [] ;  A pointer to an array of pointers to int
int (*paa) [] [];  A pointer to an array of arrays of int
int (*paf) [] () ; A pointer to an array of functions returning ints (II.LEGAL) 
int * (*pfp) ();  A pointer to a function returning a pointer to an int
int (*pfa) () [] ;  A pointer to a function returning an array of ints (ILLEGAL) 
int (*pff) () () ;  A pointer to a function returning a function returning an int (ILLEGAL) 
int **app [];  An array of pointers to pointers to int
int (*apa [] ) [];  An array of pointers to arrays of int
int (* apf [] ) () ;  An array of pointers to functions returning int
int *aap[] [] ;  An array of arrays of pointers to int
int aaa [] [];  An array of arrays of arrays of int
int aaf [] [] ();  An array of arrays of functions returning ints (ILLEGAL) 
int afp [] () ;  An array of functions returning pointers to int
int afa [] () [];  An array of functions returning arrays of ints (ILLEGAL) 
int aff [] () () ;  An array of functions returning functions returning ints (ILLEGAL) 
int **fpp () ;  A function returning a pointer to a pointer to an int
int (* fpa () ) [];  A function returning a pointer to an array of int
int (* fpf () ) ( ) ;  A function returning a pointer to an function returning an int
int *fap () [];  A function returning an array of pointers to ints (ILLEGAL) 
int faa () [] [];  A function returning an array of arrays of ints (ILLEGAL) 
int faf () [] () ;  A function returning an array of functions returning ints (ILLEGAL) 
int * ffp () () ;  A function returning a function returning a pointer to an int (ILLEGAL)