There's a question like this char z[9];
printf("%s", "Enter string:");
scanf("%8[^aeiou]", z);
printf("The input was \"%s\"\n", z);
What does %8[aeiou] mean?
aeiou>is c
where %8 means the maximum length of data to be entered. Other than that, no matter how much data is entered, we politely ignore it. For example, entering the string "1234567890" will result in "12345678".
If you look at https://modoocode.com/36, you will understand the scanf function better.
© 2024 OneMinuteCode. All rights reserved.