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
What are reserved words?
Can a function argument have default value?
Explain the difference between exit() and _exit() function?
What is the use of void pointer and null pointer in c language?
provide an example of the Group by clause, when would you use this clause
What is the purpose of sprintf?
Difference between constant pointer and pointer to a constant.
Explain how can you avoid including a header more than once?
Explain how can I write functions that take a variable number of arguments?
Explain what is meant by 'bit masking'?
what are bit fields? What is the use of bit fields in a structure declaration?
GIVEN A FLOATING POINT NUMBER HOW IS IT ACTUALLY STORED IN MEMORY ? CAN ANYONE EXPLAIN?? THE 32 BIT REPRESENTATION OF A FLOATING POINT NUMBER ALLOTS: 1 BIT-SIGN 8 BITS-EXPONENT 23 BITS-MANTISSA
how to create duplicate link list using C???
Explain how do you declare an array that will hold more than 64kb of data?
What is the difference between typedef struct and struct?