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

C program for multiplication of two matrices.

String copy without using strcpy in C.

BIOS/DOS CALLS – DISK INFORMATION