So I'm trying to create a dynamic array in C, using malloc, but for some reason it's not working out. Here's my code:
int* test = (int*) malloc(20 * sizeof(int));
printf("Size: %d\n", sizeof(test));
The console outputs 8 when I run this code, although it ideally should output 80, I believe, since the size of an int is 4, and I'm creating 20 of them. So why isn't this working? Thanks for any help. :)