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();
}
#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();
}
EmoticonEmoticon