-->

Facebook

Jasper Roberts - Blog

Saturday, April 4, 2015

Write a C Program to display the ASCII value of a given string.


#include<conio.h>
#include<conio.h>

void main()
{
char str[50];
int i;
        clrscr();

        printf("Enter the string:");
        gets(str);

        for(i=0;i<str[i] != 0; i++)
       {
          printf(" %c \t %d \n",str[i],str[i]);
        }
    getch();
}

OUTPUT:
ASCII value of a given string

No comments:

Post a Comment