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

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/10

Accuracy

0%

Get Prepinsta Prime

Get all 200+ courses offered by Prepinsta

Never Miss an OffCampus Update

Get OffCampus Updates on Social Media from PrepInsta

Follow us on our Media Handles, we post out OffCampus drives on our Instagram, Telegram, Discord, Whatsdapp etc.

Get Hiring Updates
Amazon,Google,Delottie & 30+companies are hiring ! Get hiring Updates right in your inbox from PrepInsta

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.

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.

Get PrepInsta Prime Subscription

Get access to all the courses that PrepInsta offers, check the out below -

Companies

TCS, Cognizant, Delloite, Infosys, Wipro, CoCubes, KPMG, Amazone, ZS Associates, Accenture, Congnizant & other 50+ companies

Programming

Data Structures, Top 500 Codes, C, C++, Java Python & other 10+ subjects

Skills

Full Stack Web Development, Data Science, Machine Learning, AWS Cloud, & other 10+ skills and 20+ projects