actually main function is a user defined function for the C
compiler developer.... but it is a built in or predefined
function according to the users using that compiler.... why
it is called as a predefined function because , the
prototype has already been defined in the compiler itself
we the users can't change the meaning of that unless or
until we write our own compiler , we can change the meaning
for the main() , we don't know what is the prototype or
where the function has been called and wht excatly the
return value of it... it is built in and abstracted from the
user which is called abstraction in c++.........
the definition of main is given by the user so it is called
user define function..
the prototype is define by the compiler so it is called
this function is dependent on both user and compiler for
the execution of the program.so it is not only user define
so we can say it is a special function called by operating
system to execute the program.
Main() is a predefined
returning val -all these
parameters only kown
to compile,not to
user.but we can use it
as user defined by
specifying our own
main() function is niether predefined nor user defined function. Because if it is predefined, when program is written in main() function then given their own logic then how it is predefined. Another one if it is user defined, then we can write the any function name on the place of main(). So main() is niether a predefined nor user defined function.
what is the o/p