void main()
{
int color=2;
switch(color)
{
case 0: printf("black");
case 1: printf("blue");
case 2: printf("Green");
case 3: printf("aqua");
default:printf("other");
}
}
C language
Quiz
•
Computers
•
10th Grade
•
Medium
Syeda shafaq
Used 22+ times
FREE Resource
10 questions
Show all answers
1.
FILL IN THE BLANK QUESTION
30 sec • 1 pt
void main()
{
int color=2;
switch(color)
{
case 0: printf("black");
case 1: printf("blue");
case 2: printf("Green");
case 3: printf("aqua");
default:printf("other");
}
}
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following printf:
int a=10;
b=++a;
printf("%d,%d",a,b);
11,11
10,11
11,10
10,10
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following Arithmetic Operators are having highest priority
/, *, %
+, -
Only * and /
Only /
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a logical AND operator?
||
!
&&
None of the above
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How many times "CLanguage" is printed?
#include<stdio.h>
int main()
{
int x;
for(x=-1; x<=10; x++)
{
if(x < 5)
{
continue;
}
else
{
break;
}
printf("C Language");
}
}
10 times
11 times
0 times
Infinite times
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Find out the error, if any in the below program?#include<stdio.h>
int main()
{
int j = 1;
switch(j)
{
printf("Hello programmer!");
case 1:
printf("Case1");
break;
case 2:
printf("Case2");
break;
}
}
No error in program and prints "Case1"
Error: Invalid printf statement after switch statement
Error: No default specified
None of the above
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the function is more appropriate for reading a multi-word string?
puts()
gets()
printf()
scanf()
15 questions
Informatika X Pemrograman C
Quiz
•
10th Grade
15 questions
กลางภาค ภาษาซี
Quiz
•
9th - 12th Grade
15 questions
Programming Quiz 1-3 | LPE-101 by Mettle X
Quiz
•
9th - 12th Grade
10 questions
python
Quiz
•
9th - 12th Grade
10 questions
Programming
Quiz
•
1st - 10th Grade
10 questions
C# lesson10
Quiz
•
1st - 10th Grade
10 questions
แบบทดสอบก่อนเรียนภาษาPython
Quiz
•
10th Grade
15 questions
Struktur Kontrol Perulangan, Array, dan Function (Bahasa C)
Quiz
•
10th Grade
15 questions
Character Analysis
Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
10 questions
American Flag
Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension
Quiz
•
5th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25
Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers
Quiz
•
6th - 8th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Taxes
Quiz
•
9th - 12th Grade
17 questions
Parts of Speech
Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression
Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing
Quiz
•
9th - 12th Grade
10 questions
Identifying equations
Quiz
•
KG - University