I wrote this simple code, to print the char wich it's binary value is assigned in the "bits" integer:
according to the ascii table ,the binary value of 'M' is 01001101 but when i run the program it outputs 'A'Code:#include<stdio.h> int main() { int bits=01001101; putchar(bits); getchar(); }
when i change "bits" to 01010111 wich is the ascii of 'W' the program out puts 'I'
etc'..
why is that ? what did i do wrong ?