For the following C code, I expect the last printf to print "10,10" when I input only one character. Instead it prints "10,8". Why is input
only 8 bytes when I malloc 10 bytes?
char* input;
unsigned long inputLen = 10;
input = (char*) malloc(10 * sizeof(char));
printf("Input: ");
getline(&input,&inputLen,stdin);
printf("%lu,%d",inputLen,sizeof(input));