944,214 Members | Top Members by Rank

Ad:
  • C Code Snippet
  • Views: 2307
  • C RSS
0

Strings: Looking at ASCII Code

by on Aug 20th, 2005
Commonly strings consist of ASCII characters, some are printable, some are in the backgrounds like the bell, carriage return, linefeed, tab and so forth. This code displays a table of ASCII characters and the corresponding decimal value. As always, you are encouraged to learn here.
C Code Snippet (Toggle Plain Text)
  1. /* display the ASCII character table */
  2.  
  3. #include <stdio.h>
  4.  
  5. int main()
  6. {
  7. int k;
  8.  
  9. for ( k = 14; k < 256; k++ )
  10. {
  11. printf ( "%3d = %c ",k, k );
  12. }
  13.  
  14. getchar(); /* wait for key */
  15. return 0;
  16. }
Comments on this Code Snippet
Mar 7th, 2006
0

Re: Strings: Looking at ASCII Code

Hi, can you do the same for UNICODE?

Bofarull
Newbie Poster
bofarull is offline Offline
9 posts
since Mar 2006
Message:
Previous Thread in C Forum Timeline: Factorizer
Next Thread in C Forum Timeline: defination of free function





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC