Here is my code:
int newSize = size + 1; //lets say size = 0
char * newArray = malloc(newSize * sizeof(char));
printf("%li", sizeof(newArray)); //Should be 1, prints 8
printf("%li", newSize * sizeof(char)); //Should be 1, prints 1
I have no clue why it's doing this, but I need newArray to have exactly newSize number of char spots. Any ideas?