Hello Everyone!!
While I was trying some online C language quiz, I was stuck in problem where the constraints was to take strings that only have 'R' an 'S' letter. I searched it online and got some suitable resource about the scanset Scansets in C - GeeksforGeeks. However, I have not got complete answer as I need to take input inside the while statement.
Here is the snippet:
Code:#if 1 int main() { int loop=10; u8 str[122]; while(loop--) { scanf("%[^\n]s", str); printf("%s\n",str); } return 0; } #endif // 1
This code just take input only as first time, and print the same on the output window for 10 times.
I am not sure how to take string after each display of printf function.
Any help or hint would be really appreciable.