Main function A program shall contain a global function named main, which is the designated start of the program. int main () { body } (1) int main (int argc, char *argv[]) { body } (2) int main (int argc, char *argv[] , other_parameters ) { body } (…