Question 1

Time: 00:00:00
Which of the following is not an iterative statement in java?

 

for ()

for ()

while()

while()

iterative()

iterative()

do while()

do while()

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

Please login to submit your explanation

Question 2

Time: 00:00:00
Which one of the control structures is similar to the if-else statement?

Switch-Case

Switch-Case

For loop

For loop

While loop

While loop

Continue

Continue

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

Please login to submit your explanation

Question 3

Time: 00:00:00
What will be the value of i and j after execution of the following program?

#include<stdio.h>
void main ()
{
int i, j;
for (int i = 0, j = 0; i < 10, j < 20; i++, j++)
printf ("%d % d ",i,j);
}

9 10

9 10

9 19

9 19

19 19

19 19

Error

Error

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

Please login to submit your explanation

Question 4

Time: 00:00:00
What will be the output of the following program?

#include<stdio.h>
void main()
{
int a=0;
if(a)
printf("Prepinsta");
printf("PrepinstaPrime");
}

Prepinsta

Prepinsta

PrepinstaPrime

PrepinstaPrime

Compile time error

Compile time error

None of these

None of these

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 the output of the following program?

#include<stdio.h>
void main ()
{
int a = 1;
while (a < 5)
{
printf ("Prepinsta");
}
}

Print Prepinsta 1 time

Print Prepinsta 1 time

Print Prepinsta 4 times

Print Prepinsta 4 times

Print Prepinsta infinite times

Print Prepinsta infinite times

No output

No output

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

Please login to submit your explanation

Question 6

Time: 00:00:00
If we want to execute loop body at least one then we have go for ?

do-while loop

do-while loop

while loop

while loop

for loop

for loop

None of the above

None of the above

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

Please login to submit your explanation

Question 7

Time: 00:00:00
Without curly braces how many statements we can take between do and while statements.

One

One

Two

Two

Zero

Zero

None of the above

None of the above

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

Please login to submit your explanation

Question 8

Time: 00:00:00
What will be the output of the following program?

#include<stdio.h>
void main()
{
static int a,b;
while(a>b++);
printf("%d %d", a,b);
}

0 1

0 1

0 0

0 0

0 1

0 1

1 1

1 1

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

Please login to submit your explanation

Question 9

Time: 00:00:00
How many loops are there in c ?

1

1

3

3

2

2

4

4

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

Please login to submit your explanation

Question 10

Time: 00:00:00
Which can be used for decision making statements?

switch case

switch case

break

break

continue

continue

for

for

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.