What is main in C program?
Is it a userdefined function or Built in function?
What is main in C program?
Is it a userdefined function or Built in function?
praWIN
it has both characterstics. because its prototype is specified by compilerbut its defination will be given by us.
but many people specified that it is user defined only.
Nachithe entha riskaina chesta
okkasari fix ayithe naa maata nene vinanu
OK, Thats fine. Why people say tht user defined???Originally Posted by murari
praWIN
definition of a function means the body of the function...
only the prototype of main is pre-defined.
the body hence the definition of the main function is user defined..
functions like printf(), strlen() etc are built-in functions as their definition is pre-defined.
-------
we make our habits...
and our habits make us...
i have told u naits defination given by us only. Based on that they decided it to be user defined. Inbuilt functions defination won't be given by us na.
Nachithe entha riskaina chesta
okkasari fix ayithe naa maata nene vinanu
main in cProgram is built in function
neha
main() is de only function which is invoked by the operating systems hence the name.Other functins used in a program is usually invoked by some other functions other than the OS.
Hai,
The main() in C is a function whose syntax,prototupe is defined.It is a user defied function which must exist in the program.
seshagiri.N
nice yaar.
I have told u already it has both characterstics. don't make it a big issue.
user defined because returning type and argument and its defination will be given by us,
inbuilt because its prototype given by os. os calls it directly.
plz don't extend argument on it.
no body will be convinced.
Nachithe entha riskaina chesta
okkasari fix ayithe naa maata nene vinanu
There are currently 1 users browsing this thread. (0 members and 1 guests)