what is the difference between exit() and _exit() functions?

Answers were Sorted based on User's Feedback



what is the difference between exit() and _exit() functions?..

Answer / vin

The exit() and _exit() both are the same except that the
exit() perform flushing of I/O buffer before terminating
while _exit() does not perform.

Is This Answer Correct ?    6 Yes 1 No

what is the difference between exit() and _exit() functions?..

Answer / bajishareef

exit() perform the termination operation, but before that it closes all files and flushes the I/O buffers.
_exit() just terminates the program

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More C Interview Questions

What are the 5 types of organizational structures?

0 Answers  


4.weight conversion: Write a program that will read weight in pounds and convert it into grams.print both the original weight and the converted value.There are 454 grams in a pound.design and carry out a test plan for this program.

1 Answers   Wipro,


Compare interpreters and compilers.

0 Answers  


What is the difference between volatile and const volatile?

0 Answers  


What is the difference between text files and binary files?

0 Answers  


Ow can I insert or delete a line (or record) in the middle of a file?

0 Answers  


main() {int i=5; // line 1 i=(++i)/(i++); // line 2 printf("%d",i); // line 3 } output is 2 but if we replace line 2 and line 3 by printf("%d",i=(++i)/(i++)); then output is 1. Why?

1 Answers   GATE,


what is diff b/w huge & far & near pointer??

1 Answers   HCL,


What are volatile variables?

1 Answers   Mind Tree,


what does keyword ‘extern’ mean in a function declaration?

1 Answers   Emerson,


What is the difference between array and pointer in c?

0 Answers  


main() { int i = 10; printf(" %d %d %d ", ++i, i++, ++i); }

0 Answers   Wilco,


Categories