Hi,
main()
{
}
Is a user defined function or Built in Functionn
Answers were Sorted based on User's Feedback
Answer / amit jha
1. main() itself is a predefined function.
where as main() is a userdefined function because there we
are writing the internal part.
2. it is an inbuilt function i.e, main() it indicates the
starting of the program and it is a user defined function
when the user defines it as void main() or int main(void).
3. A program usually stops executing at the end of main,
although it can terminate at other points in the program
At times, perhaps when a certain error is detected, you
may want to force the termination of a program. To do so,
use the exit function. so that main() is a user defined
function.
Is This Answer Correct ? | 4 Yes | 3 No |
Answer / yogendrra
the main funtion is both user defind and sysyem defined
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / vinit malik
main() is a system declared user defined function bcoz it is declared as built in function but defined by user means a user gives the definition of the function bcoz user defines what it will do...
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / hemanth
main method is inbuilt function.Execution of the program starts with main().JVM should know where the execution of the program start.If it is user defined function,why cant we write
int instead of void before main(string args[]).
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / pravat kumar patra
main() is a user defind function.because we write some codes
inside main to perform certain task.but in case of sqrt() if
write the function in a program it executes.but we have not
to write the function body.
consider the case:-
void main() void main()
{ {
printf("hello"); inti=25,p=sqrt(i);
} printf("%d",p);
}
use header file math.h.
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / neeraj pal
it is user define built in function............becoz user
create the methods in the main,we can change its name in the
c programming only if ,have to change the compiler coding in
which main is defined.
Is This Answer Correct ? | 2 Yes | 3 No |
Answer / ashok kumar
According to definition of predefined function,It should
perform some task,can any one tell the particularly the task
of main()function?.then the answer is clear main() is not
predefined,so then we are defining main()so absolutely user
defined function....
This is definition of predefined funtion "(computing) Any of
a set of subroutines that perform standard mathematical
functions included in a programming language; either
included in a program at compilation time, or called when a
program is executed "
Is This Answer Correct ? | 2 Yes | 3 No |
Answer / rajesh thakur
main() is User defined function... for more discussion
contact me at neothecodebreaker@ymail.com.
Is This Answer Correct ? | 2 Yes | 4 No |
Answer / saurabh kumar
well i think main is a predefine function because we can
not change the name of predefine function......
Is This Answer Correct ? | 1 Yes | 4 No |
Can you subtract pointers from each other? Why would you?
main() { int i=400,j=300; printf("%d..%d"); }
Explain what is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?
What is union and structure in c?
How do I declare an array of N pointers to functions returning pointers to functions returning pointers to characters?
a number is perfect if it is equal to the sum of its proper divisor.. 6 is perfect number coz its proper divisors are 1,2 and three.. and 1+2+3=6... a number is deficient if the sum of its proper divisor is less than the number.. sample: 8 is deficient, coz its proper divisors are 1,2 and 4, and 1+2+4=7. abundant number, if the sum of its proper divisor is greater than the number.. sample..12 is abundant coz 1+2+3+4+6=16 which is geater than 12. now write a program that prompts the user for a number, then determines whether the number is perfect,deficient and abundant..
How to convert a binary number to Hexa decimal number?? (Note:Do not convert it into binary and to Hexadecimal)
What is the use of getch ()?
What was noalias and what ever happened to it?
what is the use of bitfields & where do we use them?
If we have an array of Interger values, find out a sub array which has a maximum value of the array and start and end positions of the array..The sub array must be contiguious. Take the start add to be 4000. For Ex if we have an array arr[] = {-1,-2,-5,9,4,3,-6,8,7,6,5,-3} here the sub array of max would be {8,7,6,5} coz the sum of max contiguous array is 8+7+6+5 = 26.The start and end position is 4014(8) and 4020(5).
5 Answers Microsoft, Motorola,
What is Heap?