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

Explain what is a pragma?

1006


Describe the difference between = and == symbols in c programming?

1312


Explain what math functions are available for integers? For floating point?

1075


What is file in c language?

973


How will you write a code for accessing the length of an array without assigning it to another variable?

1020


How many types of errors are there in c language? Explain

939


In C programming, how do you insert quote characters (‘ and “) into the output screen?

1493


Why we write conio h in c?

980


Write the program that calculates and prints the average of several integers. Assume that the last value read is sentinel 9999.

3647


How is = symbol different from == symbol in c programming?

993


Is it acceptable to declare/define a variable in a c header?

1072


Why shouldn’t I start variable names with underscores?

1021


What are valid signatures for the Main function?

1183


write a program to print data of 5 five students with structures?

2011


hello freinds next week my interview in reliance,nybody has an idea about it intervew questions..so tell

2147