When writing '9' instead of 9 as my char c my endresult becomes negative and wrong for some reason. Why is that? What does '9' do?
#include <stdio.h>
int main() {
int a, b;
char c = '9';
a = 44;
b = a - c;
printf("%d \n", b);
return 0;
}

'9'is a representation of 57, which is the index at which the glyph 9 shows up in the ASCII table. As such,a-cequals to44-57, which yields the negative result.