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
Write a program to swap two numbers without using third variable?
How can I find the modification date and time of a file?
What is the purpose of scanf() and printf() functions?
Why is this loop always executing once?
What is malloc calloc and realloc in c?
how to construct a simulator keeping the logical boolean gates in c
What is formal argument?
c language interview questions & answer
Write a program to print all permutations of a given string.
What is the right type to use for boolean values in c?
Can 'this' pointer by used in the constructor?
write a c program to do the following: a) To find the area of a triangle. b) To convert the temperature from Fahrenheit to Celsius. c) To convert the time in hours : minutes : seconds to seconds.
What is indirection? How many levels of pointers can you have?
how can i access hard disk address(physical address)? are we access hard disk by using far,near or huge pointer? if yes then please explain.....
Is null always defined as 0(zero)?