I had read a line. It is: | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

I had read a line. It is:

while(1==scanf("%s",&country)) { } What does it mean?

9th Dec 2019, 5:01 AM
lamia
lamia - avatar
2 Answers
+ 1
scanf return amount of value read in from the buffer, in your case it will be 1 if it's more than 1, it will go outa the loop, why not try it in a code and see for yourself that will yield a better understanding for you
9th Dec 2019, 7:27 AM
✳AsterisK✳
✳AsterisK✳ - avatar
0
I tried. But did not understand how a string can be equal to 1. 😔
9th Dec 2019, 9:10 AM
lamia
lamia - avatar