C program to convert a string to ASCII.

source code


#include<stdio.h>
int main()
    char str[100];
    int i=0;
    printf("Enter any string: ");
    scanf("%s",str);
    printf("ASCII values of each characters of given string: "); 
    while(str[i])
    printf("%d ",str[i++]);    
    getch();      
    return 0;
}

Comments

Popular posts from this blog

8086 STRING MANIPULATION –FIND AND REPLACE A WORD

Animated Circles In C++

C program to find out the sum of series 1 + 2 + …. + n.