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 is a volatile keyword in c?
Why is %d used in c?
Why is c called a structured programming language?
Explain how can I right-justify a string?
hi... can anyone help me to make a two-dimensinal arrays in finding the sum of two elements plzzz. thnx a lot...
What are qualifiers and modifiers c?
What is ## preprocessor operator in c?
What is the meaning of 2d in c?
Why is sizeof () an operator and not a function?
Difference between linking and loading?
How can I delete a file?
Can a program have two main functions?
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
Why is it that not all header files are declared in every C program?
Can you explain the four storage classes in C?