I've just started learning C this semester after primarily learning Java and I've been asked to create a program which allows the user to enter in a string, and then scramble the letters inside their string.
#include <stdio.h> //Alows input/output operations
#include <stdlib.h> //Standard utility operations
int main(int argc, char *argv[]) //Main method
{
printf("------------------------\n");
printf("WELCOME TO THE SCRAMBLER\n");
printf("------------------------\n\n");
char userString[50]; //Declaring the user string
printf("Please input a String :> "); //Iforms the user to enter a string
scanf("%s", userString); //Allows the user to enter in a string
char targetLetter[2]; //Declaring the target letter
char replaceLetter[2]; //Declaring the replace letter
while(1)
{
}
}
This is what I currently have, I just need help/advice on how to actually scramble the string. The user should be able to scramble the string as many times as they like, until they enter a specific character, then the program terminates. Thanks for any help in advance!