Sorry to say you that you are wrong!
I am no expert but I have tried to break it down for you.
This question not only test your algorithm analysis skills but also test your language skills.
You can learn in detail about algorithmic complexity and how to translate your program to mathematics here Is there a system behind the magic of algorithm analysis?
Save this link or Bookmark it, it will be helpful to you later.
Here is your program
IMP: You need to pay attention to variable 'i' and how it plays its role in all three loops.
This problem checks your syntax knowledge, scope of variable, and complexity knowledge all three in one go.
void main()
{
int i;..............................statement 1 [executed once]
for(i=1, i<= n^2 ; i++)..............statement 2 [executed twice]
for(i=1, i<= n^4; i++)..............statement 3 [executed twice]
for(i=1, i<= n^6; i++)..............statement 4 [executed N^6]
printf("0");
}
statement 1: Scope of 'i' is permeating throughout all three loops
that is, once 'i' is incremented, its value is stored and fetched from same memory location by all three loops.
statement 2: 'i' is initialized to 1, checked for the condition (i<= $n^2$) and control moves to 3rd statement.
statement 3: again 'i' is assigned value= 1, checked for condition (i<= $n^4$) and control moves to 4th statement.
statement 4: again 'i' is assigned value= 1, checked for condition (i<= $n^6$) and looped till (i<= $n^6$) fails to match [i.e. i> $n^6$ and condition fails.]
Execution control is transferred to statement 3 where 'i' is incremented (i++) and checked for the condition again. As soon as it checks the condition, condition fails to meet because now value of 'i' = last value of 'i' + 1. So, it exits the middle loop.
So, execution control moves to statement 2 where again 'i' is incremented (i++) and checked for the condition again. But here again value of i is greater than $n^2$. Control exits the loop.
You can deduce that Big-Oh for your piece of code is $O\left(n^{6}\right)$ and not $O\left(n^{48}\right)$ because your loop actually iterated $n^6$ + 2 + 2 + 1 = $n^6$ + 5 = $O\left(n^{6}\right)$.
So, your printf statement will run $O\left(n^{6}\right)$ times.