I have this string: \"101\"
I want to write it to a file, in C, not as text: \"101\" and so 8 bits x char. but directly use the string as bits: the bit \"1\", the bit \"0\" and
You are not writing the bits 101, but the binary value of the decimal number 101, ie 1100101. Because you are fread a size of sizeof(x) bytes, your file will be sizeof(x) bytes long.