int main(){
char str1[20], str2[20];
printf("Enter string 1 : ");
scanf("%[^\n]s",str1);
printf("Enter string 2 : ");
scanf("%[^\n]s",str2);
printf("String 1 is %s\n",str1);
printf("String 2 is %s\n",str2);
removeFromSecond(str1,str2);
}
The output is :
Enter string 1 : in
Enter string 2 : String 1 is in
String 2 is ■ a
It's just not asking to enter the second string. I can't remember, but I've read somewhere that there is a line we need to add to eat up all unused '\n's. Please, if anyone knows that, I need exactly that line.