You are on page 1of 5

A very interesting question but plz don't comment here without explanation or simply proof whatever you are

posting in comments . And one request don't search it on answer,.com like sites :D cause you got nothing if you do so . Every programming language must have a main () function so my question is related to main () "its a inbuilt function or user defined function" ?? Like 11 hours ago 2 people like this.

Diwakar Chaudhary By the language point of view, it is the function that the program start-up code calls after global initialization finished, so it is "user defined"....

The question seems formulated as a (sort of) trap, since it does not define what "user" means. 11 hours ago Like 2

Varun Bansal It's an "Inbuilt Func" Ritu Kathania, plz clarify if u knw the correct ans..! 11 hours ago Like 2

Vikas Saini main is predeclared function.......but its defination is given by programmer i.e us 11 hours ago via mobile Like 2

Sourabh Jain ofcourse its a user defined function, as we make it. If it wasnt so, it should not have shown linker error when we compile without main() 11 hours ago via mobile Edited Like 2

Diwakar Chaudhary what you think Ritu? 10 hours ago Like

Goel Anuj every function hv two thing 1)declaration(prototype) 2)difinition main proto type is inbuilt but definition is user define........ 10 hours ago Edited Like 3

Ritu Kathania Mr Varun firstly see what others are commenting here and at the end I try to give you correct ... 10 hours ago Like

Ritu Kathania MR Diwakar Chaudhary this group is full of expertise and I am still a kid in programming we should wait for sometime 10 hours ago Like 1

Vikas Saini so , ultimately its a user defined Func. and is not important to write if u define a saperate entery point in Linker.......and that is what an another advantage of having linker.... 10 hours ago via mobile Like 1

Diwakar Chaudhary Mis Ritu Kathania, dont evaluate yourself less . Its global and open for all. Everyone can be expert. 10 hours ago Like 2

Aman Singh main() is a inbuilt user defined function, b'coz we only defiend d main wherever we want and however we want but we can't make our main() function. main() is predefined function , in C u cant define any function twice. 10 hours ago Like 1

Ritu Kathania Not all can make main() but few one can and some mastermind of programming had done this & it seems to be impossible but its possible as I think but very much difficult just like impossible 10 hours ago Like

Sunny Tripathi main() is userdefined funtion .nd proto type inbuilt.........................main() is called by startup code that the compiler adds to your program to mediate between the program and the operating system nd function header describes the interface between main() and operating system. 10 hours ago Like 1

Aman Singh no Ritu, if u are using GCC ,G++ or any C compiler... it is predefined and inbuilt in form of soure code....thats y main() is inbuilt.... 9 hours ago Edited Like 1

Ritu Kathania Ok Sir then where it is stored ?? As I have seen it is not mentioned in keywords also in few languages 9 hours ago Like

Vikas Saini actually its Linker which links all of if we make changer in Linker then we can easily replace main with XYZ() function to start with.............. 9 hours ago Like 2

Aman Singh main() is not a keyword.. its a function, nd in standred c library include this type of function... hey pls dont call me sir... i'm a also a student like u... so pls 9 hours ago Edited Like 2

Ritu Kathania Again its "jo bhi main kehna chahoon barbaad keren alfaaz mere " and I don't say you believe on others check out C library if you got this then I believe that you are right and other are wrong specially I am wrong & I want to know the correct answer so must check

9 hours ago Like 1

Diwakar Chaudhary by seeing all comments. It seems main is a system declared user defined function ??? 9 hours ago Like 3

Aman Singh ya ri8 Diwakar... 9 hours ago Like

Vikas Kumar Sharma main is inbuilt function, we overwrite it's def in our program...... 9 hours ago Like

Diwakar Chaudhary @Vikas , which is the base class for main function?? 9 hours ago Like

Vikas Saini Vikas Kumar Sharma ......maybe overload it 9 hours ago Like

Zaniab Taimoor whats the right answer? 9 hours ago Like 1

Ritu Kathania Lets finish this conversation so right answer according to me is.. This a user defined we can't say its a inbuilt because it's source code is not available to users it is not mentioned in library functions and it is stored in run time environment and invokes using system call by an OS and if anyone knows more about plz send msg or provide some link for correct informations if you feel I am wrong and thanks to all for doing such a nice effort for me 9 hours ago Like 2

Pawan Patidar oye oye.... 9 hours ago Like 1

Ashok Pandian main is an user defined function only. compiler start reading from main function only . Its just syntax , it instruct the compiler where to start:P