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 #include stdio h?
void main(){ int a; a=1; while(a-->=1) while(a-->=0); printf("%d",a); }
What is modifier & how many types of modifiers available in c?
Can you explain the four storage classes in C?
What are variables and it what way is it different from constants?
How can I write data files which can be read on other machines with different word size, byte order, or floating point formats?
Where static variables are stored in memory in c?
How can I swap two values without using a temporary?
Write a C program to count the number of email on text
Does c have an equivalent to pascals with statement?
Why isnt any of this standardized in c?
Not all reserved words are written in lowercase. TRUE or FALSE?
What is the ANSI C Standard?
1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. The Logic should be written in Data Structures?
What is methods in c?