How do I convert a binary string like “010011101” to an int, and how do I convert an int, like 5, to a string “101” in C?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If it is a homework problem they probably want you to implement
strtol, you would have a loop something like this:If you wanted to get fancy you could use these in the loop: