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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Describe a pattern that is not the factory pattern?

453


Tell me what are the different types of customizations that is used with the “volatile” keyword?

495


Write a constant time consuming statement lot finding out if a given number is a power of 2?

477


Tell me what is null pointer and what is its use?

481


Tell me when one must use recursion function? Mention what happens when recursion functions are declared inline?

455






Explain the difference between mutexes vs semaphores?

473


What is a semaphore? What are the different types of semaphore?

452


How does the interrupt architecture works?

501


Tell me can structures be passed to the functions by value?

443


Discuss the concept of yagni.

473


Explain whether we can use semaphore or mutex or spinlock in interrupt context in linux kernel?

482


What is the scope of a function that is declared as static?

455


How are local and global variables are allocated by compiler.

493


Explain interrupt latency and how can we decrease it?

452


Tell me what is rtos?

464