ALLInterview.com :: Home Page KalAajKal.com
 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                      
tip   To Refer this Site to Your Friends   Click Here
Google
 
Categories  >>  Software  >>  Programming Languages  >>  C
 
 


 

 
 C interview questions  C Interview Questions
 C++ interview questions  C++ Interview Questions
 VC++ interview questions  VC++ Interview Questions
 Delphi interview questions  Delphi Interview Questions
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions
Question
Can we write a program without main() function?
 Question Submitted By :: Sivavendra
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Can we write a program without main() function?
Answer
# 1
no we can write a program with out main function, this 
function is the main function which usually help OS to kill 
the process that has executed, like in JAVA main() is used 
as a thread whose wqork is to kill the executed process and 
mark those as GC( Garbage collection)
 
Is This Answer Correct ?    1 Yes 0 No
Rahul
 
  Re: Can we write a program without main() function?
Answer
# 2
no we can't write a program with out main function, this 
function is the main function which usually help OS to kill 
the process that has executed, like in JAVA main() is used 
as a thread whose wqork is to kill the executed process and 
mark those as GC( Garbage collection)
 
Is This Answer Correct ?    4 Yes 0 No
Rahul
 
 
 
  Re: Can we write a program without main() function?
Answer
# 3
as for i know in C , we cant write a program wit out main()..
since whatever function we write (user defining functions).
it will start executing the statements only from the
main().... so only we will say tht FIRST EXECUTABLE FUNCTION
IS THE MAIN() FUNCTION.........
 
Is This Answer Correct ?    1 Yes 0 No
Vignesh1988i
 
  Re: Can we write a program without main() function?
Answer
# 4
I think its possiblle through macros ....like this

 #define main() start
  start
{
printf("Hai");
}
 
Is This Answer Correct ?    1 Yes 3 No
Rajkumar
 
  Re: Can we write a program without main() function?
Answer
# 5
no because every c prog. can compile from main function.
but when we write a code for creating a header file, we 
cant use main function.
 
Is This Answer Correct ?    0 Yes 0 No
Vaibhav
 
  Re: Can we write a program without main() function?
Answer
# 6
no we cant write bcoz main() tells to the processor that it 
is starting of the c programming
 
Is This Answer Correct ?    0 Yes 0 No
Revathipawar
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
How would you find a cycle in a linked list?  2
What is macro? IBM3
Why the use of alloca() is discouraged? Oracle2
what is the return value (status code) of exit() function.... what the arguments(integer value) passed to it means.... TCS1
main() { int x=5; printf("%d %d %d\n",x,x<<2,x>>2); } CitiGroup3
what are the uses of structure? HCL3
What is the difference between null pointer and void pointer CTS2
Write one statement equalent to the following two statements x=sqr(a); return(x); Choose from one of the alternatives a.return(sqr(a)); b.printf("sqr(a)"); c.return(a*a*a); d.printf("%d",sqr(a)); TCS4
Who had beaten up hooligan "CHAKULI" in his early college days?  1
can i know the source code for reversing a linked list with out using a temporary variable? Honeywell3
Write a program that takes three variables(a,b,c) in as separate parameters and rotates the values stored so that value a goes to b,b,to c and c to a  3
What is the output for the program given below typedef enum grade{GOOD,BAD,WORST,}BAD; main() { BAD g1; g1=1; printf("%d",g1); } ADITI2
declare afunction pointer to int printf(char *)? HCL1
Which of these statements are false w.r.t File Functions? i)fputs() ii)fdopen() iii)fgetpos() iv)ferror() A)ii B)i,ii C)iii D)iv Accenture3
write a program for even numbers?  6
In scanf h is used for BFL2
the format specified for hexa decimal is a.%d b.%o c.%x d.%u TCS3
What is the Difference between Macro and ordinary definition? Motorola2
Write a program for the following series: 1*3*5-2*4*6+3*5*7-4*6*8+.................up to nterms Convex-Digital4
prototype of sine function. Cadence2
 
For more C Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com