Zoho Complex and Nested Flows Quiz 1

Question 1

Time: 00:00:00
What is the output of C Program?


int main()
{
int k, j;

for(k=1, j=10; k <= 5; k++)
{
printf("%d ", (k+j));
}

return 0;
}

compiler error

compiler error

10 10 10 10 10

10 10 10 10 10

11 12 13 14 15

11 12 13 14 15

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
What will be the output of the following C code?


int main()
{
short i;
for (i = 1; i >= 0; i++)
printf("%d\n", i);

}

The control won’t fall into the for loop

The control won’t fall into the for loop

Numbers will be displayed until the signed limit of short and throw a runtime error

Numbers will be displayed until the signed limit of short and throw a runtime error

Numbers will be displayed until the signed limit of short and the program will successfully terminate

Numbers will be displayed until the signed limit of short and the program will successfully terminate

This program will get into an infinite loop and keep printing numbers with no errors

This program will get into an infinite loop and keep printing numbers with no errors

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 is the output of C Program.?


int main()
{
while(true)
{
printf("RABBIT");
break;
}

return 0;
}


RABBIT

RABBIT

RABBIT is printed unlimited number of times

RABBIT is printed unlimited number of times

No output

No output

Compiler error.

Compiler 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 is the output of C Program.?


int main()
{
int a=0, b=0;
while(++a < 4)
printf("%d ", a);

while(b++ < 4)
printf("%d ", b);

return 0;
}


0 1 2 3 1 2 3 4

0 1 2 3 1 2 3 4

1 2 3 1 2 3 4

1 2 3 1 2 3 4

1 2 3 4 1 2 3 4

1 2 3 4 1 2 3 4

1 2 3 4 0 1 2 3

1 2 3 4 0 1 2 3

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 is the output of C Program.?


int main()
{
int k;

for(printf("FLOWER "); printf("YELLOW "); printf("FRUITS "))
{
break;
}

return 0;
}


Compiler error

Compiler error

FLOWER FRUITS

FLOWER FRUITS

FLOWER YELLOW

FLOWER YELLOW

FLOWER YELLOW FRUITS

FLOWER YELLOW FRUITS

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

Please login to submit your explanation

Start

Question 6

Time: 00:00:00
What is the output of C Program.?


int main()
{
int k, j;

for(k=1, j=10; k <= 5; k++)
{
printf("%d ", (k+j));
}

return 0;
}


compiler error

compiler error

10 10 10 10 10

10 10 10 10 10

11 12 13 14 15

11 12 13 14 15

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
What is the output of C Program.?


int main()
{
int a=32;

do
{
printf("%d ", a);
a++;
if(a > 35)
break;
}while(1);

return 0;
}


No Output

No Output

32 33 34

32 33 34

32 33 34 35

32 33 34 35

Compiler error

Compiler error

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

Please login to submit your explanation

Start

Question 8

Time: 00:00:00


#include
int main()
{
int sum = 23;

for(int i = 2; i <= 5; i++ )
{
for(int j = i; j <= 5; j++ )
{
printf("i = %d " , i );
printf("j = %d " , j);
printf("\n");
}
}

return 0;
}


  i = 2 j = 1 i = 2 j = 2 i = 2 j = 3 i = 2 j = 4 i = 2 j = 5 i = 3 j = 1 i = 3 j = 2 i = 3 j = 3

  i = 2 j = 1 i = 2 j = 2 i = 2 j = 3 i = 2 j = 4 i = 2 j = 5 i = 3 j = 1 i = 3 j = 2 i = 3 j = 3

i = 2 j = 2 i = 2 j = 3 i = 2 j = 4 i = 2 j = 5 i = 3 j = 3 i = 3 j = 4 i = 3 j = 5 i = 4 j = 4 i = 4 j = 5 i = 5 j = 5

i = 2 j = 2 i = 2 j = 3 i = 2 j = 4 i = 2 j = 5 i = 3 j = 3 i = 3 j = 4 i = 3 j = 5 i = 4 j = 4 i = 4 j = 5 i = 5 j = 5

Compilation error since variable i can not be used in the inner for loop.

Compilation error since variable i can not be used in the inner for loop.

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 9

Time: 00:00:00
What will be the output of the following C code?


#include
void main()
{
int k = 0;
for (k)
printf("Hello this is prepinsta");
}


Compile time error

Compile time error

hello

hello

Nothing

Nothing

Varies

Varies

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

Please login to submit your explanation

Start

Question 10

Time: 00:00:00
What will be the output of the following C code?


#include
int main()
{
int sum = 23;

for(int i = 2; i <= 5; i++ )
{
for(int j = 7; j <= 9; j++ )
{
sum += ( i * j);
}
}
printf("%d",sum);

return 0;
}


234

234

359

359

224

224

None of these

None of these

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