Wednesday, March 2, 2011

Character Arrays and Strings

Write a program, which reads your name from the keyboard and outputs a list of ASCII codes, which represent your name.

#include <stdio.h&gt
main()
{
char character;
clrscr();
printf("Enter your name to know ASCII Code of your name:");
while(character!='\n')
{
character=getchar();
printf("%d",character);
}
getch();
}

No comments:

Post a Comment