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 | #1

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

    • January 29, 2010 at 4:40 pm | #2

      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 | #3

    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 | #4

      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 | #5

    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 )

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

Follow

Get every new post delivered to your Inbox.