Hi Guru here.......my question is....... Is it necessary to
start the execution of a program from the main() in C?

Answers were Sorted based on User's Feedback



Hi Guru here.......my question is....... Is it necessary to start the execution of a program from ..

Answer / kumar

we can execute the program without main() also,but according
to the standardization of 'c' we must write the main
function.main is called as start-up function......during
compilation there will be a _start function by which the
execution starts.this _start calls main,after main execution
it returns to the _start function then it starts the
execution of the remaining code............

Is This Answer Correct ?    5 Yes 0 No

Hi Guru here.......my question is....... Is it necessary to start the execution of a program from ..

Answer / ian

"Normally you are at liberty to give functions whatever
names you like, but ``main'' is special - your program
begins executing at the beginning of main. This means that
every program must have a main somewhere." Kernighan &
Ritchie - The C Programming Language 2ed. p.6

Is This Answer Correct ?    7 Yes 4 No

Hi Guru here.......my question is....... Is it necessary to start the execution of a program from ..

Answer / shreepad

Most new toolchains allow you to configure the entry point
other than main(). hence unless other wise specified, main
is the default entry point.

Is This Answer Correct ?    3 Yes 0 No

Hi Guru here.......my question is....... Is it necessary to start the execution of a program from ..

Answer / amol

no

Is This Answer Correct ?    6 Yes 8 No

Post New Answer

More Embedded Systems AllOther Interview Questions

Tell me what are inline functions?

0 Answers  


Describe the life-cycle of a software development (application design) process.

0 Answers  


What are the advantages and disadvantages of separation of concerns?

0 Answers  


What is the difference between unit test and integration test?

0 Answers  


Tell me what is the function of simple thread poll in embedded system?

0 Answers  


Explain me what is endianness of a system and how do different systems communicate with each other?

0 Answers  


Explain the difference between "set" logic, and "procedural" logic.

0 Answers  


Explain the difference between "set" logic, and "procedural" logic. When would you use each one and why?

0 Answers  


Please explain the difference between mutexes vs semaphores?

0 Answers  


What are the types of embedded system?

0 Answers  


Explain what is meant by a sandbox, why you would use one, and identify examples of sandboxes in the wild.

0 Answers  


Do you know what is the function of watchdog timer in embedded system?

0 Answers  


Categories