Printing the octal representation of a character in C...
First let me start by saying I am new to C. My program needs to read in a character in binary(including non-printable characters) and then display the character in octal representation, like the 'od' program does. My code is as follows:
Code:
int c; Quote:
I'll admit, I don't really understand...basically typing "myod test" should perform the same function as typing "od test", where test is a binary file. Thanks for your help. |
Code:
od -b test Code:
man od |
All times are GMT -5. The time now is 10:41 PM. |