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 |
Write a program to accept a character & display its corrosponding ASCII value & vice versa?
#define min((a),(b)) ((a)<(b))?(a):(b) main() { int i=0,a[20],*ptr; ptr=a; while(min(ptr++,&a[9])<&a[8]) i=i+1; printf("i=%d\n",i);}
Write a program to generate a pulse width frequency of your choise,which can be variable by using the digital port of your processor
Write a C program to find the smallest of three integers, without using any of the comparision operators.
Is c object oriented?
Write a program to display the no of bit difference between any 2 given numbers eg: Num1 will 12->1100 Num2 will 7->0111 the difference in bits are 2.
#include<stdio.h> #include<conio.h> void main() { int m=0111,n=20; printf("%d%d\n",m,n); getch(); }
if (i = 0)printf ("True"); elseprintf("False"); Under what conditions will the above print out the string "True" a) Never b) Always c) When the value of i is 0 d) all of the above
how to make a scientific calculater ?
What is difference between Structure and Unions?
What is the function of this pointer?
0 Answers Agilent, ZS Associates,
How is a pointer variable declared?