144k views
4 votes
The _________ function causes a program to terminate.

1 Answer

5 votes

Answer: exit

Step-by-step explanation:

exit function terminates the calling process without executing the rest of the code.exit function do some cleaning before termination like buffer flushes etc.

exit(0) exits the program without any error message.

syntax:- void exit(int return code)

You have to include stdlib.h header file in c if you want to use exit function.

User Gduq
by
4.3k points