Converting C string to binary representation
问题 In ANSI C, how do we convert a string in to an array of binary bytes? All the googling and searching gives me answers for C++ and others and not C. One idea I had was to convert the string into ASCII and then convert each ASCII value into its binary. (Duh!) I know it is the dumbest of ideas but I am not sure of any other option. I've heard abt the encoding function in Java. I am not sure if that suits the same purpose and can be adopted to C. string = "Hello" bytearr[] = 10100101... some byte