john pfeiffer
  • Home
  • Categories
  • Tags
  • Archives

ascii char int printout

/* 
john pfeiffer summer 2007
print the ascii chars and corresponding numbers then the option
*/
#include <stdio.h>

int main(void)
{   int i;
    char c;

    for(i=0;i<128;i++)
    {   printf("%d %c  !!  ",i,(char)i);    }

    printf("\nplease press the key which you would like to see the "); 
    printf("ascii code for and then press enter\n");
    c = getchar();
    printf("%d",c);

return 0;
}

  • « ftp client in c
  • execute time testing »

Published

Jun 1, 2007

Category

c

~49 words

Tags

  • ascii 4
  • c 95
  • char 3
  • int 2
  • printout 1