Is there a way I can use sscanf to read in input from the command line??? I would have just used scanf but I want to convert the integers to octal and then logically shift the result. Any reply at all would be appreciated
how can i use sscanf to read in input from the command line
Collapse
X
-
-
you would read an integer then convert it to octal(i can assume it would be a character array) and then shift logically,
does not make sense. help us out, to logically shifting why need to convert it to octal?
if you want to convert a integer to octal then use sprintf function
example:
Code:char a[8];//just choosing 8 no reason why 8 int x=1000; sprintf(a,"%o",x); //it would create the octal output and store it in a
Comment
Comment