In C Language Is Main() Function Library Or Userdefind ?
Can't find what you're looking for?
Ask a Question, Get an Answer ASAP
The main() function is always, always, user defined. It is the part of a program that makes the other functions, whether they be library functions or user defined ones, run. It is the starting point of the program.
Every program in C must have a main() function, or it simply will not run. It cannot run without one. When you enter the name of your exe file at the command line, it is the main() function which is executed. It can call other functions or other programs after it starts. The other functions which you, the programmer, create are called inside the main(), while you make reference to library functions.
Javascript, on the other hand, doesn't have a main(), it is a set of functions and the programmer either decides which one will run on loading the html page, or they are called at specific points in the html page, often in response to user interaction.
answered 2 years ago
Ask questions on any topic, get great answers from real people for FREE. Blurtit has hundreds of thousand of members so your sure to get the answer your looking for.