Is main() function predfined or userdefined?
Answers were Sorted based on User's Feedback
Answer / nara venkata satyanarayana
First we should know whether main() belongs to C/C++ or
java. If it is in C/C++ it is "user-defined" because not
available in any header file and body defined by user, but
compiler will starts body execution from main() function
only. But in java without main() also we can execute
programs and get output eg:-using static blocks.
Here also it is "user-defined" one.
| Is This Answer Correct ? | 9 Yes | 1 No |
Answer / sreehari
main() function is user-defined function. Before knowing the
reason, we should know one thing is we can use predefined
function and get the result but we never write code for
predefined functions explicitly na....and we use to write
the code of main function for our desires.
| Is This Answer Correct ? | 7 Yes | 1 No |
Answer / gunda rajkumar
"userdefined" because we are writing the code for main()
or we are defining the boby for main()
| Is This Answer Correct ? | 8 Yes | 3 No |
Answer / subodh sharma
The main function is predefine and have three arguments
which return the value to the operating system and main is
also called by operating system .
| Is This Answer Correct ? | 11 Yes | 9 No |
Answer / mohit jain
main() function is user defined function becoz we defined it.
it is not predfined in header files.
| Is This Answer Correct ? | 4 Yes | 2 No |
Answer / aditya reja
main() is a user define function because its definition
is always define by user and its definition is not present in
any header file.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / vignesh1988i
it is a predefined function..............
| Is This Answer Correct ? | 8 Yes | 15 No |
Write a program to produce the following output in c language? 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1
What is the use of putchar function?
What are static variables, and where are they stored?
do ne body have any idea about the salary for the we r going to have interview. yup .. u got it right ..i m talking abt NIC.
code for selection sort?
int *p=20; if u print like dis printf("%d",p); o\p:- 20; how is it possible? plz give me the explanation.
Can static variables be declared in a header file?
how to multiply two number taking input as a string (considering sum and carry )
What are the different types of C instructions?
Can you write a programmer for FACTORIAL using recursion?
What is c variable?
Write a program to check whether a number is prime or not using c?