C program not executing Serially
According to me C program should execute sequentially. I am referring to one of the standard C example projects developed by the micro controller chip manufacturers, i see in some of the functions where it sometimes executes the previous lines of code.
Code:
Ex:
void func1(void)
{
Line1: Statement 1
Line2: Statement 2
Line3: Statement 3
}
It executes Statement2 and normally should execute statement3 but it executes statement1 and then comes back to statement3.
How is it possible? Please advise.