0

About scanf(input operation).

How do we know whether the user has entered input or not? Suppose :we used scanf function to read integer.but the user don't want to enter. He didn't enter .how do we recognise that he didn't enter?

14th Jan 2018, 5:39 PM
Vijaykrishna Ramagiri
Vijaykrishna Ramagiri - avatar
4 Answers
+ 1
well if he didn't entered anything then prompt will wait for the input unless he enters somthing and if he enters something thats not compatible with the input type then program will crash to handle this runtime error one must use exceptions handler. try, throws and catch.
14th Jan 2018, 5:49 PM
Shubham Dalal
Shubham Dalal - avatar
0
Thanks bro "Shubham dalal ".my question is perfectly understood by you.i'll try exeptional handling.
15th Jan 2018, 12:30 AM
Vijaykrishna Ramagiri
Vijaykrishna Ramagiri - avatar
0
Welcome bro
15th Jan 2018, 1:49 AM
Shubham Dalal
Shubham Dalal - avatar