:: 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                      
Categories >> Software >> Programming Languages >> C


 C interview questions  C Interview Questions (2254)
 C++ interview questions  C++ Interview Questions (1111)
 VC++ interview questions  VC++ Interview Questions (342)
 Delphi interview questions  Delphi Interview Questions (510)
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions (646)
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  
# 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 ?    51 Yes 10 No
# 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
this function is dependent on both user and compiler for
the execution of the 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 ?    10 Yes 2 No
Sandeep Kumar Yadav
# 3
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 17 No
# 4
main() is predefined function, coz we can't change it's
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 7 No
Vilas Soni++
# 5
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 ?    5 Yes 4 No
B.laddu Lal
# 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
Is This Answer Correct ?    3 Yes 2 No
Chitaranjan Barik
# 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 1 No
Pramod Jirage
# 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 1 No
Shankar Dayal
# 9
main is Predefined.why because its is implemented by the
Is This Answer Correct ?    3 Yes 9 No

Other C Interview Questions
  Question Asked @ Answers
wat is the output int main() { char s1[]="Hello"; char s2[]="Hello"; if(s1==s2) printf("Same"); else printf("Diff"); }   3
nic scientist exam NIC 1
declare afunction pointer to int printf(char *)? HCL 1
LOGIC OF Bodmas?   1
what will be the output of "printf("%d%d",scanf("%d% d",&a,&b))".provide an explation regarding the question   6
Given a number N, product(N) is the product of the digits of N. We can then form a sequence N, product(N), product(product(N)) For example, using 99, we get the sequence 99, 99 = 81, 81 = 8. Input Format: A single integer N Output Format: A single integer which is the number of steps after which a single digit number occurs in the sequence. Sample Test Cases: Input #00: 99 Output #00: 2 Explanation: Step - 1 : 9 * 9 = 81 Step - 2 : 8 * 1 = 8 There are 2 steps to get to this single digit number. Input #01: 1137638147   2
what r callback function?   1
Write a C program to check a number even or odd, without using any relational, arithmetic operator and any loops.   1
what does the following code do? fn(int n,int p,int r) { static int a=p; switch(n){ case 4:a+=a*r; case 3:a+=a*r; case 2:a+=a*r; case 1:a+=a*r; } } a.computes simple interest for one year b.computes amount on compound interest for 1 to 4 years c.computes simple interest for four year d.computes compound interst for 1 year TCS 7
what is the difference between exit() and _exit() functions?   2
How can I prevent other programmers from violating encapsulation by seeing the private parts of my class?   1
When you call malloc() to allocate memory for a local pointer, do you have to explicitly free() it? Aloha-Technology 2
For more C Interview Questions Click Here 

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