ALLInterview.com :: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Google
   
 
Categories >> Software >> Programming Languages >> C
 
 


 

 
 C interview questions  C Interview Questions (2265)
 C++ interview questions  C++ Interview Questions (1119)
 VC++ interview questions  VC++ Interview Questions (342)
 Delphi interview questions  Delphi Interview Questions (510)
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions (648)
Question
Hi,
main()
{
}

Is a user defined function or Built in Functionn
 Question Submitted By :: C
I also faced this Question!!     Answer Posted By  
 
Answer
# 1
Its a user defined function. How can it be inbuilt
function? We are the one who writes the main function.
Program execution starts with main function. We can also
compile a code without main, but we cant create exe, since
it requires a main function to execute.
 
Is This Answer Correct ?    52 Yes 9 No
Manjunath
 
Answer
# 2
main is a system declared user defined function 
Is This Answer Correct ?    29 Yes 8 No
Yogesh Bansal
 
 
 
Answer
# 3
main() itself is a predefined function.

where as main() is a userdefined function because there we
are writing the internal part.
 
Is This Answer Correct ?    24 Yes 8 No
Sree
 
Answer
# 4
main() is a user defined function. it is the entry point of
any program.
At run time the main() function is searched as the entry to
start the program.
 
Is This Answer Correct ?    21 Yes 6 No
Vikas Kumar Shakya
 
Answer
# 5
=> The main function serves as the starting point for
program execution.

=> It usually controls program execution by directing the
calls to other functions in the program.

=> A program usually stops executing at the end of main,
although it can terminate at other points in the program
for a variety of reasons.
=> 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. See the Run-Time Library Reference
for information on and an example using the exit function.

so that
main() is a user defined function. it is the entry point of
any program.
 
Is This Answer Correct ?    10 Yes 5 No
Govind
 
Answer
# 6
main is a kind of function which is a user defined function for the C compiler developer and it is built in or predifined function to the users using that compiler. The prototype has already been defined in the compiler itself we the users can't change the meaning of that unless or until we write our own compiler. 
Is This Answer Correct ?    5 Yes 0 No
Eklavya Sharma
 
Answer
# 7
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 2 No
Amit Jha
 
Answer
# 8
main() is user Defined funtion 
Is This Answer Correct ?    2 Yes 0 No
Suyash Kumar Singh
 
Answer
# 9
main() is a system declared bt user defined function
coz main is declared as built in functions but we give the
definition of main according to us. means it is defined by
the user.
 
Is This Answer Correct ?    5 Yes 4 No
Suresh Kumar
 
Answer
# 10
1: Main is not a user defined function because user defined
functions can be given be given their own names .We can not
give a new name to main.

2:Main is not an inbuilt function because every inbuilt
function is defined in a specific library .But main has not
been defined in any library.it even works without libraries.

So finally main is just a convention to start a program.
Every language like java,c++,c all start their execution
from main.All programs need a starting point.
 
Is This Answer Correct ?    4 Yes 3 No
Ekta
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
the output will be #include<stdio.h> int main () { int i; i = 9/2; printf("%i",i); return 0; } TCS 4
write a program to print the all 4digits numbers & whose squares must me even numbers? Virtusa 2
main() { int i=5; printf("%d",++i + i); } output is 10 ------------------------ main() { int i=5; printf("%d",i++ + i); }output is 12 why it is so? give appropiate reason....   2
The postoder traversal is 7,14,3,55,22,5,17 Then ur Inorder traversal is??? please help me on this   1
How to write in a function declaration and in function call in which the function has 'n' number of varible or arguments?   2
Define function pointers?   1
Program to write some contents into a file using file operations with proper error messages.   2
what is the role you expect in software industry? HCL 2
write a c program to find biggest of 3 number without relational operator? Wipro 12
consider the following C code main() { int i=3,x; while(i>0) { x=func(i); i--; } int func(int n) { static sum=0; sum=sum+n; return(sum); } the final value of x is TCS 4
Write a program in c using only loops to print * * * * * ******* Ibm 2
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.   4
 
For more C Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
   
Copyright 2013  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  KalAajKal.com