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
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 |
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 |
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 |
How are macros different from inline functions?
What is inversion of control?
What happens when recursion functions are declared inline?
Why is it better to use multi-threading polling instead of a single threading model?
Can we use semaphore or mutex or spin lock in interrupt context in linux kernel ?
What is spin lock?
Write a program to show the functionality of power-save super loop.
Whether we can use semaphore or mutex or spinlock in interrupt context in linux kernel?
How do you identify hardware errors?
How i/o devices are classified for embedded system?
look at following code void foo(void) { unsigned int a = 6; int b = -20; int c = (a+b > 6) ? 1:0; } o/p is 1 why explain promotion rules
What is a semaphore? What are the different types of semaphore?