Is it an optional code? What is its use?
Why does the function "main()" appears in every C code?
This is how you tell the C compiler where to start execution. This is not optional for a complete program. That is, the program always starts running by calling the main() function, which may call other functions in turn. We say that main() is an "entry point" for your code, a place to start execution.
Reply:main function is an entry point of a C program.
Reply:main() is the function that holds whatever the code is. The compiler looks for this in order to compile the program.No, it's not optional, without it, your code will not compile/run properly.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment