Home > OOP344 > Week 3 Challenge

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
  1. Wen Fang, Chen
    January 29, 2010 at 4:37 pm

    I think here in bio_putch(val), val is the ASCII value for the char.

    • January 29, 2010 at 4:40 pm

      I tested it and it put numbers. so when I pressed ‘9’ on keyboard it showed ‘9’ on the screen

  2. Wen Fang, Chen
    January 29, 2010 at 9:50 pm

    but if you input “123” I believe it is different. One digit int it will be treat as one character.

    • January 29, 2010 at 10:41 pm

      Just tried it when I put “123” it showed “123” on the screen. Are you getting different results when you try it?

  3. Wen Fang, Chen
    February 1, 2010 at 3:29 am

    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?

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: