Zoho Control Flows Quiz 1

Question 1

Time: 00:00:00
Which of the following is an iteration statement?

Switch

Switch

If-else

If-else

If

If

Do-while

Do-while

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

Please login to submit your explanation

Start

Question 2

Time: 00:00:00
In java, -----------can only test for equality, whereas ------------can evaluate any type of boolean expression

Switch, if

Switch, if

If, switch

If, switch

If, break

If, break

Continue, if

Continue, if

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

Please login to submit your explanation

Start

Question 3

Time: 00:00:00
Which of the following is used with switch Statements

do

do

Break

Break

Exit

Exit

Continue

Continue

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

Please login to submit your explanation

Start

Question 4

Time: 00:00:00
Which of the following is not a valid jump statement?

break

break

goto

goto

continue

continue

return

return

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

Please login to submit your explanation

Start

Question 5

Time: 00:00:00
Which of the following is not a valid flow control statement?

exit()

exit()

break

break

continue

continue

return

return

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

Please login to submit your explanation

Start

Question 6

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

Start

Question 7

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


int i = l, j = -1;
switch (i)
{
case 0, 1: j = 1; /* Line 4 */
case 2: j = 2;
default: j = 0;
}
System.out.println("j = " + j);


Compilation fails

Compilation fails

j=2

j=2

j=3

j=3

j=1

j=1

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

Please login to submit your explanation

Start

Question 8

Time: 00:00:00
Which statement is used to skip for the current iteration and continue for the next statement?

Break

Break

Continue

Continue

Skip

Skip

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

Start

Question 9

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


int i = 1, j = 10;
do
{
if(i > j)
{
break;
}
j--;
} while (++i < 5);
System.out.println("i = " + i + " and j = " + j);

 i = 5 and j = 5

 i = 5 and j = 5

i = 6 and j = 5

i = 6 and j = 5

i = 5 and j =5

i = 5 and j =5

i = 5 and j = 6

i = 5 and j = 6

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

Please login to submit your explanation

Start

Question 10

Time: 00:00:00
Which statement is used inside the switch to stop fall-through condition?

Continue

Continue

Break

Break

goto

goto

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

Start

["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%

Completed

0/0

Accuracy

0%

Prime

Prime Mock

Topic-Wise Full Mock and much more

For Zoho
Get Prime Mock

Prime

Prime Video

Full Video Course for Zoho

For Zoho
Get Prime Video

Comments