exit function, and block or compound statements in C

exit: exit () is a standard library function for immediate termination of a program at any instance. General form of exit statement:

void exit(int return_code);

Here, the value of the return_code is returned to the operating system. For a normal program termination zero should be used. For using the exit () function you have to use include the standard library:

#include <stdlib.h>

Block or Compound statements: A logically bound group of statements is called a block statement. A block statement stars with { and ends with }

For Example:


a = 35;

printf(“%d”, a);


Leave a Reply