Then you will have two different paths of execution. One can call scanf to read an octal value since that is built into scanf, and the other must use string input because there is no native support...
Type: Posts; User: sonjared
Then you will have two different paths of execution. One can call scanf to read an octal value since that is built into scanf, and the other must use string input because there is no native support...
Do you want the user to type either binary or octal and have the program figure out which it is?
If the input could be using any radix, you have little choice but to use string input for the number, which would then be converted to the correct representation.