+ 4
++àŒ’Â«á”› ⁱ ⁿ ᔃ Êž ᔃ á”Â»àŒ’++ I agree with Slick, as the linked SO thread suggest, check the return value from `scanf` before using the input buffer for whatever needs. Additionally, try to initialize the char array like `char x[256] = {0};`. This way the array will be populated with null character. Why I'm suggesting this? there is a *possibility* that those weird characters are already there before the array is passed as argument to `scanf` because the array was not initialized. Even better, print each character in <x> casted as integer to verify that they were valid (according to the scanset defined). P.S. I don't use DCoder.
11th Oct 2020, 1:44 PM
Ipang
+ 2
Not sure, thia one takes a single word and prints it. Input: hello Output:hello https://code.sololearn.com/cL26SeAN02WL/?ref=app
11th Oct 2020, 11:33 AM
Slick
Slick - avatar
+ 2
Well i can see and assumed you just wanted upper case and numbers. But read this: guys code was stopped by a '\n' when checking for ["aeiou"] https://stackoverflow.com/questions/33320729/for-scanf-why-is-negated-scanset-n-showing-correct-output-for-n-bu
11th Oct 2020, 11:55 AM
Slick
Slick - avatar
+ 1
What were you looking for? With that code, youre able to enter upper, lower case, or number and it will print no problem.
11th Oct 2020, 11:36 AM
Slick
Slick - avatar