I want to know something regarding main function. For an application, the syntax for main function is something like: void main(void) { // ... // code // ... } but if we write as: int main(void) { // ... // code // ... return(0); } Here, who will handle the return value from main function. Normally embedded application is an infinite loop, so there wont be any chance of returning from main. But still it it terminates, then who will there to handle return value from main.
"Here, who will handle the return value from main function." Nobody will handle it - the RET will pop some nonsense return address off the stack and you program will run wild.
THIS AIN'T NO PC! in embedded (in case you missed it, the '51 and Keil make embedded projects) main does NOT return, why on earth would it? Erik