Read a string and print ASCII value of each character of the string
Input:
Implementation:
Input:
Enter the string: abcdef
Output:
97 98 99 100 101 102
Implementation:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX 1000000
int main(void) {
char s[MAX];
int i;
printf("Enter the string:\n");
scanf("%s",s);
for(i=0;i<strlen(s);i++)
{
printf("%d ",s[i]);
}
return 0;
}