(C programming) What is the meaning of the following declaration and how much memory is allocated?
a) int* arr1[4];
Don't use plagiarized sources. Get Your Custom Essay on
Question & Answer: (C programming) What is the meaning of the following declaration and how much memory is allocated?…..
GET AN ESSAY WRITTEN FOR YOU FROM AS LOW AS $13/PAGE
b) int (*arr2)[4];
c) int (*arr4[4])[4];
Expert Answer
int * arr1[4]; ->means array of 4 integer pointers (array consist of 4 pointers) and memory allocated is 32. (4 consecutive memory blocks of type int *).
int (*arr2)[4] ->means pointer to an array of 4 integers and memory allocated is 8.
int (*arr4[4])[4] -> means pointer to an array of 4 integer pointers. Memory allocated is 32.