View Single Post
  #13   Spotlight this post!  
Unread 03-07-2007, 13:02
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: C Programming Homework Help Needed

Quote:
Originally Posted by Pat McCarthy View Post
It was. Thanks.

Now how can I use the char value?

I tried:
printf("%c", buffer);

But that printed out an an arrow pointing up.
If you just want to print the value of the float, skip the sprintf() call and go straight to printf():
Code:
float f = 12.4;
printf("%f",f);
The *printf() family of functions (sprintf(), fprintf(), printf(), etc.) all work similarly. Becoming familiar with them will help.

If you ever have a simple question about a function, Google is your friend. (Just put in the function name or "C functionName".) Even Wikipedia has an article about most standard functions.