saving . . . saved About main function has been deleted. About main function has been hidden .
About main function
Title
Question
Can we use two main functions in a single program

C-and-Cpp First-C-Program 11-12 min 50-60 sec 09-04-17, 9:27 p.m. Zulukarmajeed

Answers:

NO
27-04-17, 6:15 p.m. rakibaaroma0078600@gmail.com
reason plz..?

27-04-17, 6:50 p.m. Zulukarmajeed
Simple reason is "C doesn't supports Method Overloading"
29-02-20, 11:38 a.m. kapilshukla2006

Login to add comment


because in a single program there will be only one main function
27-04-17, 10:34 p.m. rakibaaroma0078600@gmail.com


No we cant use two main functions in our program because once we write our program then compiler checks the main() function in our program and then it executes the instructions that are written in main() one by one.That's why our program should contain one and only one main() function.
18-07-17, 2:34 p.m. AISH98


Log-in to answer to this question.