it simply allocates n bytes of the memory but, does this means that these bytes are connected each other and finally make a list? thanks...
Code:#include <stdio.h> #include <stdlib.h> typedef struct Person{ int age; struct Person *next; }ListPerson; int main(){ int n; ListPerson *A; printf("Type the size of the array:"); scanf("%d", &n); A = malloc(n*sizeof(struct Person)); if(A == NULL) exit(1); return 0; }