Quiz 1

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

Start

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

Start

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

Start

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

Start

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

Start

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

Start

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

Start

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

Start

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

Start

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

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%

Prime

PrepInsta Prime Video

Complete video course for Cognizant GenC Elevate

for Elevate
Get Prime Video
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