Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

HOW TO HANDLE EXCEPTIONS IN C

Answer Posted / eok

in C you dont have the luxury of the try and catch , unless
you get a non standard library
There is a way to handle errors
C works directly with the machine , so you must make a
function that will take whatever is causing the problem in
the buffers and remove it or clear the buffer altoeghter ,
although clearing the entire buffer can be over zealous

try using ungetc to remove stray pieces from the buffer

but again this really comes down to what error your trying
to deal with

also look at perror and strerror and the libraries errno.h
and stderr.h

hope this helped

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a volatile keyword in c?

1214


Why is %d used in c?

1061


Why is c called a structured programming language?

1336


Explain how can I right-justify a string?

1097


hi... can anyone help me to make a two-dimensinal arrays in finding the sum of two elements plzzz. thnx a lot...

1967


What are qualifiers and modifiers c?

1064


What is ## preprocessor operator in c?

1133


What is the meaning of 2d in c?

1168


Why is sizeof () an operator and not a function?

1091


Difference between linking and loading?

1157


How can I delete a file?

1124


Can a program have two main functions?

1178


count = 0; for (i = 1;i < = 10; i++);count = count + i; Value of count after execution of the above statements will be a) 0 b) 11 c) 55 d) array

1137


Why is it that not all header files are declared in every C program?

1285


Can you explain the four storage classes in C?

1170