Question: How many times will statement execute in the following code snippet? for ( int i = 3 ; i 1 ; i - - )

How many times will statement execute in the following code snippet?
for (int i=3; i1; i--)
{
for (int j=4;j>0; j--)
{
cout "print line" endl; }
}
9 times
The loop will run infinitely and hence the cout statement too
16 times
12 times
 How many times will statement execute in the following code snippet?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!