We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I am getting an error for void main() function.. Please help me. I am using AT89C51.
while(1); does not return
Generally compilers special case the treatment of main(), assuming it returns an int, and not fussing overly in the absence of the return keyword.
The behaviour if it does return/exit depends on the startup code, but in embedded systems it not usually desirable as there is no-where for the exit code to be propagated too, and the system will either crash, lock, reset, or fail in some manner.