Strings: Looking at ASCII Code

bumsfeld 1 Tallied Votes 155 Views Share

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.

/* display the ASCII character table */

#include <stdio.h>

int main()
{
  int k;
  
  for ( k = 14; k < 256; k++ )
  {
    printf ( "%3d = %c ",k, k );
  }
    
  getchar();   /* wait for key */
  return 0;
}
bofarull 0 Newbie Poster

Hi, can you do the same for UNICODE?

Bofarull

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.