I am not very familiar with C so I am a bit confused on the type safety of the language.
For example.
char* my_pointer;
my_pointer = malloc(sizeof(char));
if (*my_pointer == 0b0000)
{
// this might be true or false, doesn't matter
}
How come the code runs? Why doesn't it just blow up at *my_pointer == 0b0000
?
Shouldn't *my_pointer
return a char?
So technically shouldn't only something like *my_pointer == 'a'
be able to work?