Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Input error detection

Status
Not open for further replies.

danesh

Full Member level 3
Full Member level 3
Joined
Nov 24, 2003
Messages
184
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,296
Activity points
1,343
Hi guys,

hw to write a error detection code for condition where a variable is declared as int and user inputed mayb a non integer input ie. char

for example :

int b;
printf ("enter num!\n");
scanf("%ld",&b);

hw do we write a code so error msg could be flaged whenever user input non int values.

thanks....
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top