#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;
}
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
12 questions
Java Strings
Quiz
•
9th - 12th Grade
10 questions
AP CSA Unit 1 & 2 Review
Quiz
•
9th - 12th Grade
14 questions
C ++ For Loop
Quiz
•
9th - 12th Grade
15 questions
AP Computer Science A Review 1
Quiz
•
10th - 12th Grade
10 questions
C# Programming 2
Quiz
•
12th Grade
12 questions
C# Arrays
Quiz
•
9th - 12th Grade
10 questions
TRẮC NGHIỆM PYTHON
Quiz
•
9th - 12th Grade
14 questions
C++ - Loops and Random Numbers
Quiz
•
9th - 12th Grade
15 questions
Multiplication Facts
Quiz
•
4th Grade
25 questions
SS Combined Advisory Quiz
Quiz
•
6th - 8th Grade
40 questions
Week 4 Student In Class Practice Set
Quiz
•
9th - 12th Grade
40 questions
SOL: ILE DNA Tech, Gen, Evol 2025
Quiz
•
9th - 12th Grade
20 questions
NC Universities (R2H)
Quiz
•
9th - 12th Grade
15 questions
June Review Quiz
Quiz
•
Professional Development
20 questions
Congruent and Similar Triangles
Quiz
•
8th Grade
25 questions
Triangle Inequalities
Quiz
•
10th - 12th Grade
40 questions
Week 4 Student In Class Practice Set
Quiz
•
9th - 12th Grade
40 questions
SOL: ILE DNA Tech, Gen, Evol 2025
Quiz
•
9th - 12th Grade
20 questions
NC Universities (R2H)
Quiz
•
9th - 12th Grade
25 questions
Triangle Inequalities
Quiz
•
10th - 12th Grade
65 questions
MegaQuiz v2 2025
Quiz
•
9th - 12th Grade
10 questions
GPA Lesson
Lesson
•
9th - 12th Grade
15 questions
SMART Goals
Quiz
•
8th - 12th Grade
45 questions
Week 3.5 Review: Set 1
Quiz
•
9th - 12th Grade