Thread: Printf Question
View Single Post
  #2   Spotlight this post!  
Unread 06-03-2004, 19:23
deltacoder1020's Avatar
deltacoder1020 deltacoder1020 is offline
Computer Guy
AKA: Dav
#1020 (The Indiana Prank Monkeys)
Team Role: Programmer
 
Join Date: Jan 2004
Location: Muncie, Indiana
Posts: 340
deltacoder1020 has a spectacular aura aboutdeltacoder1020 has a spectacular aura about
Send a message via AIM to deltacoder1020
Re: Printf Question

Quote:
Originally Posted by Greg
This is probably a dumb question but I dont have as much experience with C as I'd like to Is it possible to printf a char as an ASCII character? printf_lib.c says %c is unsupported. But somehow strings enclosed in quotation marks print with no problems. How do I convert a byte to a single-character string?
try creating a 1-element char array, and then assigning the value of the byte to the first element (element 0) in the array.
__________________
Team 1020, the Indiana Prank Monkeys (www.team1020.org)