Code structure question (again)

I am still in doubt with the flow of the following code:

void haha(int k)
{

bebe(k); //another function call



for(int i = 1; i<10; i++)
{
if(condition)
{
do1;
do2;
do3;

haha(k + 1);

do4;
do5;
}
}


}

My prediction of the flow is that, if the function is called inside the for loop - haha(k+1) -, that function gets executed first before do4 and do5 right?
I am still confused how this code proceed from the beginning..
Since your program has no loop constructs, your program will run from the top down one line at a time.
It is a for loop?
Sorry I missed the for loop (indentation would make your program easier to read). But the same holds true within the loop each line runs from the start of the loop to the bottom of the loop. Then once the loop ends it will proceed with the statement following the loop's terminating brace.
Topic archived. No new replies allowed.