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 (2266)
 C++ interview questions  C++ Interview Questions (1121)
 VC++ interview questions  VC++ Interview Questions (342)
 Delphi interview questions  Delphi Interview Questions (510)
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions (652)
Question
main is a predefined or user define function
if user  defined why?
if predefined whay?
 Question Submitted By :: C
I also faced this Question!!     Answer Posted By  
 
Answer
# 1
actually main function is a user defined function for the C
compiler developer.... but it is a built in or predefined
function according to the users using that compiler.... why
it is called as a predefined function because , 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 , we can change the meaning
of main()......

for the main() , we don't know what is the prototype or
where the function has been called and wht excatly the
return value of it... it is built in and abstracted from the
user which is called abstraction in c++.........


thank u
 
Is This Answer Correct ?    54 Yes 11 No
Vignesh1988i
 
Answer
# 2
the definition of main is given by the user so it is called
user define function..
the prototype is define by the compiler so it is called
predefine...
this function is dependent on both user and compiler for
the execution of the program.so it is not only user define
or predefine..
so we can say it is a special function called by operating
system to execute the program.
 
Is This Answer Correct ?    14 Yes 2 No
Sandeep Kumar Yadav
 
 
 
Answer
# 3
Main() a userdefined function or a predefined function a multimillion question?

main() is neither predefined nor userdefined function its a special member function call by Operating System......
 
Is This Answer Correct ?    7 Yes 4 No
B.laddu Lal
 
Answer
# 4
the main() is a predefined function because we can't change
the name of the function or characterstics of the function.

If the function is user defined means we can change the
name of the function as we wish.

So,the main() is a predefined function.
 
Is This Answer Correct ?    20 Yes 18 No
S.s.venkatesh
 
Answer
# 5
main() is predefined function, coz we can't change it's
prototype....
We can only implement it.... And we have to use main() in
our program coz it's "Entry Point" to any C program....

(We can say userdefined, if we can also define it's
prototype and name, and in this case we can't!, we can use
only available types of main()....)
 
Is This Answer Correct ?    10 Yes 8 No
Vilas Soni++
 
Answer
# 6
Main() is a predefined
function,because it's
prototype,call function,
returning val -all these
parameters only kown
to compile,not to
user.but we can use it
as user defined by
specifying our own
parameter
 
Is This Answer Correct ?    3 Yes 3 No
Chitaranjan Barik
 
Answer
# 7
main() is to be predefined beoause the progarm contralm
flows from main and it is essiontal to opreat the program
 
Is This Answer Correct ?    0 Yes 3 No
Pramod Jirage
 
Answer
# 8
main() function is niether predefined nor user defined function. Because if it is predefined, when program is written in main() function then given their own logic then how it is predefined. Another one if it is user defined, then we can write the any function name on the place of main(). So main() is niether a predefined nor user defined function. 
Is This Answer Correct ?    0 Yes 3 No
Shankar Dayal
 
Answer
# 9
main is Predefined.why because its is implemented by the
developer
 
Is This Answer Correct ?    3 Yes 11 No
Ankith.v
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
code snippet for creating a pyramids triangle ex 1 2 2 3 3 3   4
what will be the output for the following main() { printf("hi" "hello"); }   5
void main() { int i=5; printf("%d",i++ + ++i); } ME 21
character array A[12] can hold Wipro 5
Design a program using an array that lists even numbers and odd numbers separately from the 12 numbers supplied by a user.   8
The differences between Windows XP and Windows Visa HCL 8
If the static variable is declared as global, will it be same as extern? Samsung 1
#include<stdio.h> main() { int a[3]; int *I; a[0]=100;a[1]=200;a[2]=300; I=a; Printf(%d\n, ++*I); Printf(%d\n, *++I); Printf(%d\n, (*I)--); Printf(%d\n, *I); } what is the o/p a. 101,200,200,199 b. 200,201,201,100 c. 101,200,199,199 d. 200,300 Tieto 2
how to convert binary to decimal and decimal to binary in C lanaguage BPO 7
what is the diff between the printf and sprintf functions?? and what is the syntax for this two functions ??   5
what is the difference between char * const and const char *? TCS 2
c program to subtract between two numbers without using '-' sign and subtract function.   2
 
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