2,232 views

1 Answer

Best answer
2 2 votes

Answer is option D]

for a given code, Out put will be : 012345678910111213141516171819

Option A will result in : 012345678910111213141515151515151515....

Option B will result in : 0123456789101112131415  

Option C : x variable has to be initialized first.

Option D : 012345678910111213141516171819

Hence the answer.

The continue skips the statements after it. And continues with next iteration.

edited by
Position:
Show:

Related questions

5 5 votes
2 2 answers
304
304 views
GO Classes asked Jun 5
304 views
What is the output of the following code?#include <stdio.h int main() { int a[5] = {2, 4, 1, 3, 5}; int i, sum = 0; for (i = 0; i < 5; i++) { if (a[i] % 2 == 0) sum = sum...
12 12 votes
1 1 answer
355
355 views
GO Classes asked Jun 3
355 views
What is the output of the following code?#include <stdio.h int main() { int i, j, sum = 0; for (i = 1; i <= 4; i++) { for (j = 1; j <= 4; j++) { if (j == i) continue; if ...
12 12 votes
2 2 answers
427
427 views
GO Classes asked Jun 3
427 views
What is the output of the following code?#include <stdio.h int main() { int i, j, count = 0; for (i = 1; i <= 3; i++) { for (j = 1; j <= i; j++) { count = count + j; } } ...
2 2 votes
1 1 answer
810
810 views
shivamSK asked Jun 15, 2024
810 views
#include <stdio.h int main () { int i, k; int a [8] = {33,34,35,36,37,40,50,38}; for(i = 0; i < 3; i++) { a[i] = a[i] + 1; i=i+1; } i=i-1; for (k = 7; k 4; k ) { int i =...