Please login

Prime

Prepinsta Prime

Video courses for company/skill based Preparation

(Check all courses)
Get Prime Video
Prime

Prepinsta Prime

Purchase mock tests for company/skill building

(Check all mocks)
Get Prime mock

InfyTQ Introduction To Programming Quiz 1

Question 1

Time: 00:00:00
Which of the following control  statements will be executed at least once even if the condition inside the loop is evaluated false?

while

while

for

for

do-while

do-while

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 2

Time: 00:00:00
Which of the following is the correct syntax for the “if” condition in Java?

  1. if (condition) :
{ //statements to be executed //if the condition is true. }

  1. if (condition) :
{ //statements to be executed //if the condition is true. }

  1. if (condition) ;
{ //statements to be executed //if the condition is true }

  1. if (condition) ;
{ //statements to be executed //if the condition is true }

  1. if (condition)
{ //statements to be executed //if the condition is true. }

  1. if (condition)
{ //statements to be executed //if the condition is true. }

  1. if (condition)
//statements to be executed  //if the condition is true.

  1. if (condition)
//statements to be executed  //if the condition is true.

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

Please login to submit your explanation

Start

Question 3

Time: 00:00:00
Statements that determine which statement to execute and when, are known as?

Break Statements

Break Statements

Decision making statements

Decision making statements

Iteration Statements

Iteration Statements

Jump Statements

Jump Statements

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 control statements tests for equality?

Switch

Switch

while

while

do-while

do-while

if

if

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 control statements enhances the readability of the program?

while

while

if

if

if-else

if-else

switch

switch

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

Please login to submit your explanation

Start

Question 6

Time: 00:00:00
In which of the following loops the user does not need to increment the value of the iterator?

while

while

do-while

do-while

for-each

for-each

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 7

Time: 00:00:00
The statements in java which are used to jump from one statement to another thus transferring the flow of execution are?

Decision-making statements

Decision-making statements

Jump statements

Jump statements

Branching Statements

Branching Statements

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 8

Time: 00:00:00
The statement which is used to terminate the loop and stop the current flow of the program are?

Jump

Jump

Continue

Continue

Switch

Switch

Break

Break

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

Please login to submit your explanation

Start

Question 9

Time: 00:00:00
To skip the current iteration and jump to the next iteration of the loop, we make use of?

Switch

Switch

Continue

Continue

Break

Break

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 10

Time: 00:00:00
In switch statements the case expression can be of data type?

Int,string and enum type

Int,string and enum type

Any data type

Any data type

Float,double

Float,double

Boolean

Boolean

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!"]

Completed

0/0

Accuracy

0%

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%