Week 3 Challenge
By using only the function in biof.c you can print integers by using the function below
void bio_putint(int val){ bio_putch(val); }
Categories: OOP344
By using only the function in biof.c you can print integers by using the function below
void bio_putint(int val){ bio_putch(val); }
I think here in bio_putch(val), val is the ASCII value for the char.
I tested it and it put numbers. so when I pressed ’9′ on keyboard it showed ’9′ on the screen
but if you input “123″ I believe it is different. One digit int it will be treat as one character.
Just tried it when I put “123″ it showed “123″ on the screen. Are you getting different results when you try it?
Follow your logic, in main function if add one line bio_putint(123); it will same as bio_putch(123); is that you mean these two are same?
Please test this use the code from class notes, add your function, add bio_putint(123) in main, what’s the result?