Originally Posted by
laserlight
Perhaps if you posted example code that you're puzzling about instead of an "analogy from real life", we could have a basis for explanation. If not, my answer from analogy would be: "anyone can see that I've finished drinking the water, duh!"
Maybe I didn't clear it well, but I'm meaning whenever a function is done and all alright, how CPU knows that the function has been successfully finished?! for example, lets assume there is a function
Code:
void doing_something()
{
printf("Hello world");
}
whenever I call the function the pc will read what's inside the function, my question is how does he know that he arrived to the end of the function successfully ?!
thanks!