I have a question regarding the size of data in a const void*. In the code below, the output of the first printf is 6 while the output of the second printf is 3. Please help, I cannot find where the problem comes from. Thank you in advance
#define TEST "\x00\x01\x02\x03\x04\x05"
#include <stdio.h>
static void function(const void* c);
int main (void) {
printf("TEST: %d\n",sizeof(TEST) -1);
function(TEST);
return 0;
}
static void function(const void* c) {
printf("TEST: %d\n",sizeof(c) -1);
}