Control Structures

Control Structures

12th Grade

10 Qs

quiz-placeholder

Similar activities

COMPUTER PROGRAMMING Q2_FLOWCHART (2 points each)

COMPUTER PROGRAMMING Q2_FLOWCHART (2 points each)

11th - 12th Grade

10 Qs

Tin 12 - Bài 1 - Củng cố

Tin 12 - Bài 1 - Củng cố

12th Grade

10 Qs

INTRODUCCION A LA PROGRAMACION

INTRODUCCION A LA PROGRAMACION

6th Grade - University

10 Qs

Python List

Python List

4th Grade - University

15 Qs

Binary Subtraction

Binary Subtraction

12th Grade

10 Qs

1.1.1 The structure and function of the processor

1.1.1 The structure and function of the processor

11th Grade - University

15 Qs

Control y Robótica

Control y Robótica

12th Grade

10 Qs

Identifying devices

Identifying devices

12th Grade

11 Qs

Control Structures

Control Structures

Assessment

Quiz

Computers

12th Grade

Practice Problem

Hard

Created by

Maraziah bakar

Used 82+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

#include<stdio.h>

int main()

{

int num=1; //initializing the variable

while(num<=10) //while loop with condition

{

printf("%d\n",num);

num++; //incrementing operation

}

return 0;

}

1 2 3 4 5 6 7 8 9 10

1

2

3

4

5

6

7

8

9

10

1

2

3

4

5

6

7

8

9

1 2 3 4 5 6 7 8 9

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

4) What will be the output of following program ?

#include < stdio.h >

int main()

{

int tally=0;

for(;;)

{

if(tally==10)

break;

printf("%d ",++tally);

}

return 0;

}

0 1 2 3 4 5 6 7 8 9 10

0 1 2 3 ... infinite times

1 2 3 4 5 6 7 8 9 10

1 2 3 4 5 6 7 8 9

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The continue statment cannot be used with

for

while

do...while

switch

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is an invalid if-else statement?

if (if (a == 1)){}

if (a){}

if ((char) a){}

if (func1 (a)){}

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How many times i value is checked in the below code?

int main()

{

int i = 0;

do {

i++;

printf("in while loop\n");

} while (i < 3);

}

2

3

4

1

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the output of following program?

13

12

10

15

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the output of following program?

0 1 2 3

0 1 2 3 4

1 2 3 4

1 2 3

Create a free account and access millions of resources

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?