Control Structures

Quiz
•
Computers
•
12th Grade
•
Hard
Maraziah bakar
Used 81+ times
FREE Resource
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
What will be the output of following program?
13
12
10
15
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
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
Similar Resources on Wayground
10 questions
Sains Komputer : 1.6.1

Quiz
•
12th Grade
11 questions
Python Quiz

Quiz
•
12th Grade
10 questions
Latihan Interface

Quiz
•
9th - 12th Grade
10 questions
Introduction to C++ 2024/25

Quiz
•
12th Grade
6 questions
Evaluación sobre Matrices en C

Quiz
•
12th Grade
10 questions
Programming with C++

Quiz
•
9th - 12th Grade
15 questions
Tes VLAN 2 Router

Quiz
•
12th Grade
15 questions
Python - Chpt 1 - Review

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade
19 questions
AP CSP Unit 1 Review (code.org)

Quiz
•
10th - 12th Grade