+ 1
It is a fluke in the way Sololearn works. Sololearn runs your code as a batch process so it must get all input before your program runs. Sololearn scans your code text for known keywords that would require console input so that it can determine whether to prompt. In this case, it finds the word "scanf", even though the whole word is "sscanf". I give Sololearn one demerit point for this failure.
22nd Apr 2022, 12:47 PM
Brian
Brian - avatar
+ 3
You don't have user input here.. sscanf is used to scan farmated input from a string reader.. Example: from a file.. Here you are reading into input city, state, population from info character array... Snoqualmie read into city WA read into state 13190 read into population... hope it helps...
22nd Apr 2022, 11:40 AM
Jayakrishna 🇼🇳
+ 2
Jayakrishna🇼🇳 the problem does seem to be fixed. Now I am ashamed to admit that I didn't test it before answering. :-\ It used to be one of the longstanding annoyances in Sololearn, and I assumed it was still a problem. So that begs the question, how did vipul jain encounter the problem? A related issue that still exists, I confirmed just now, is if you use scanf in C++, Sololearn does NOT recognize the need for console input, and so it fails to prompt.
22nd Apr 2022, 8:05 PM
Brian
Brian - avatar
+ 2
Brian no worries as I also wants to know where OP encounters it.. That's actual question also.. About cpp to recognize scanf, you need atleast one standard, cin in your program.. So that it prompt input.
22nd Apr 2022, 9:18 PM
Jayakrishna 🇼🇳
+ 1
It does not prompt any in sololearn also. It's working fine in sololearn..
22nd Apr 2022, 2:57 PM
Jayakrishna 🇼🇳