patterncppMinor
What type of function is main()?
Viewed 0 times
typemainfunctionwhat
Problem
As the functions are of 2 type:
1.Pre-defined/library functions,
2.User defined functions.
What type of function is main() function?
This doubt comes in my mind while writing a program we define the main() function as we do the others.
Please help!!!
1.Pre-defined/library functions,
2.User defined functions.
What type of function is main() function?
This doubt comes in my mind while writing a program we define the main() function as we do the others.
Please help!!!
Solution
Library functions are functions that somebody else coded, and are available for use.
User-defined functions are functions that the user defines. This is the case of the C/C++
You can think of
User-defined functions are functions that the user defines. This is the case of the C/C++
main().You can think of
main() as a placeholder or hook. The user supplies it, but the standard library knows to call it after initializing itself.Context
StackExchange Computer Science Q#71390, answer score: 3
Revisions (0)
No revisions yet.