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 does 2n 4c mean?

1231


Difference between MAC vs. IP Addressing

1147


What is a global variable in c?

1003


What are identifiers c?

1078


Explain the meaning of keyword 'extern' in a function declaration.

1155


How can I use a preprocessorif expression to ?

1061


any "C" function by default returns an a) int value b) float value c) char value d) a & b

1083


What does s c mean on snapchat?

1109


What are loops in c?

997


If null and 0 are equivalent as null pointer constants, which should I use?

1215


Is c call by value?

1014


What is a macro?

1103


writ a program to compare using strcmp VIVA and viva with its output.

2023


What is zero based addressing?

1169


Does * p ++ increment p or what it points to?

1117