Quick Tip : Scanf waiting for more than expected inputs

Spread the love

Scanf waiting for more than expected inputs:

This problem occurs if you use White spaces such as blanks, tabs, newlines,  in the scanf function. like below

scanf(“%d %d n”,&a,&b);

observe there is one space between two %d  Fformat specifiers. So remove all spaces and Try again.
It should work.

From scanf manual page :

Related Tutorials :

Venkatesh Macha

Hi Guys, I am Venkatesh Macha. I am a programmer and an Open Source enthusiast, Presently working as a Software Engineer. Apart from that, I love to explore new technologies and things.

You may also like...

Leave a Reply