Why the execution of the c programme alway starts from main functions .

Showing Answers 1 - 5 of 5 Answers

R.sivakumar

  • Mar 8th, 2006
 

ans is: C complier first checks for main() function. if the complier found the main() function,execution starts at this point.

  Was this answer useful?  Yes

chandan M

  • May 21st, 2006
 

it has to do with the execution module,well after the compiler compiles the code, the entry relocatable address location is marked, according to the binary format of a particular OS.In C programs, this entry relocatable address location where the execution starts, is nothing but the Main Function.that means the address of the main function is essentially the control transfer address of the binary file generatedif you want to know more or any other doubts, you can mail me ( openangle@gmail.com )

  Was this answer useful?  Yes

Vani Bappa

  • Sep 28th, 2006
 

As in C language top to bottom approach isused so prog always starts execution from main( ).

  Was this answer useful?  Yes

Jhansi

  • Oct 20th, 2011
 

The C programme always start from main function because its a per-defined functions(i.e)its already defined in library fiile(Header files).

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions