C Program to Display Equivalent ASCII values for each characters of the given String

SOURCE CODE:
#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
 {
 static char name[20];
 int i,l;
 clrscr();
 printf("Enter your name :");
 scanf("%s",name);
 l=strlen(name);
 printf("Your Name is %s & it contains %d characters.",name,l);
 printf("\nName & it's ASCII Equivalent.\n");
 printf("==== = ==== ===== ========== \n");
 for(i=0;i<l;i++)
  printf("\n %c\t\t%d",name[i],name[i]);
 printf("\n============================ \n");
 getch();
 }
Previous
Next Post »

If you still didn't find what you're looking for, you can search this website below: