Difference between Break and Exit()
Break V/S Exit() :-
Break | Exit() |
1 . Break is a keyword in c. | 1 . exit () is a standard library function. |
2 . Break causes an immediate exit from the switch or loop(for,while,do). | 2 . exit () terminates program execution when it is called. |
3 . Break is a reserved word in C; Therefore it can’t be used as a variable name. | 3 . exit () can be used as a variable name. |
4 . No header files needs to be include in order to use break statement in a C program. | 4 . stdlib.h needs to be include in order to use exit (). |
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment