text: #include <stdio.h> #include <string.h> int main() { char string[256]; //This will hold out string char chrset[256]; //this will hold the character set int num[256]; //This will hold the result int count = 0; //This is just for loops printf("Please enter a String: "); scanf("%s", string); printf("Please enter a Character set: "); scanf("%s", chrset); //Get user input for the string & chrset //This will load the placements into num[] while(string[count] != 0) { num[count] = ((strchr(chrset, string[count])) - (int)chrset); count++; } count = 0; //This will print out the placements while(count != strlen(string)) { printf("%c is in %d\n", string[count], num[count]); count++; } printf("Press any key to quit ...\n"); getchar(); getchar(); return 0; }
  Are you able to help answer this sponsored question?
  Questions asked by members who have earned a lot of community kudos are featured in order to give back and encourage quality replies.