Question 1

Time: 00:00:00

Among the giving loop types, which loop will execute at least one time?

While Loop

While Loop

Do while loop

Do while loop

For loop

For loop

Both a and b

Both a and b

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 2

Time: 00:00:00
How many times Hello will be printed , after the execution of the given for loop :


for(int i=1; i!=10 ; i += 2)
cout<<”Hello “;

10

10

5

5

infinite

infinite

None of the mentioned

None of the mentioned

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 3

Time: 00:00:00

What the following code means:


for(; ;);

Will not executes

Will not executes

Execute normally

Execute normally

Infinite loop

Infinite loop

Compile time error

Compile time error

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 4

Time: 00:00:00
Among which of the following continue can’t be used?

For block

For block

While block

While block

Switch block

Switch block

Do-While block

Do-While block

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 5

Time: 00:00:00
What will be output of the following code :


int main(){
int i=10;
while(i--);
cout<<i<<” “;
return 0;
}

10 9 8 7 6 5 4 3 2 1 0

10 9 8 7 6 5 4 3 2 1 0

9 8 7 6 5 4 3 2 1 0

9 8 7 6 5 4 3 2 1 0

0(Zero)

0(Zero)

Error

Error

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 6

Time: 00:00:00
For loop will terminates when condition returns

0(zero)

0(zero)

1(one)

1(one)

<=0

<=0

None of the mentioned

None of the mentioned

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 7

Time: 00:00:00
Which of the following represents the correct syntax of for loop?

for(initialization, condition, inc/dec);

for(initialization, condition, inc/dec);

for(initialization, condition, decrement);

for(initialization, condition, decrement);

for(initialization, condition, inc/dec)

for(initialization, condition, inc/dec)

None of the mentioned

None of the mentioned

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 8

Time: 00:00:00
Which of the following is known as the exit control loop?

While Loop

While Loop

For Loop

For Loop

Switch Loop

Switch Loop

Do-While Loop

Do-While Loop

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 9

Time: 00:00:00
Which of the following is known as the entry control loop?

While Loop

While Loop

For Loop

For Loop

Switch Loop

Switch Loop

Do-While Loop

Do-While Loop

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 10

Time: 00:00:00
While loop will execute if condition give :

Non Zero Value

Non Zero Value

1(one)

1(one)

0(zero)

0(zero)

Positive value

Positive value

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

["0","40","60","80","100"]
["Need more practice!","Keep trying!","Not bad!","Good work!","Perfect!"]

Personalized Analytics only Availble for Logged in users

Analytics below shows your performance in various Mocks on PrepInsta

Your average Analytics for this Quiz

Rank

-

Percentile

0%

Get over 200+ Courses under One Subscription

mute

Don’t settle Learn from the Best with PrepInsta Prime Subscription

Learn from Top 1%

One Subscription, For Everything

The new cool way of learning and upskilling -

Limitless Learning

One Subscription access everything

Job Assistance

Get Access to PrepInsta Prime

Top Faculty

from FAANG/IITs/TOP MNC's

Get over 200+ course One Subscription

Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others.

Comments