
Switch (Quiz - 4)
Authored by Kunal Goyal
Computers
University
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
int i=3;
switch(i){
case 1: printf("DO\n");
case 2: printf("Re\n");
case 3: printf("Me\n");
default: printf("Sa Re Ga Ma Pa \n" );
}
DO
Re
Me
Sa Re Ga Ma Pa
Re
Me
Sa Re Ga Ma Pa
Me
Sa Re Ga Ma Pa
2.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
int i = 0 ;
switch (i){
case '0' : printf("Geeks");
break;
case '1' : printf("Quiz");
break;
default: printf("GeeksQuiz");
}
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
int main() {
char i =3;
switch(i)
{
case '1' : printf("DO\n");
case '2' : printf("Re\n");
case '3' : printf("Me\n");
default : printf("Sa Re Ga Ma Pa\n");}
printf("India");
}
Sa Re Ga Ma Pa
Me
Sa Re Ga Ma Pa
India
Sa Re Ga Ma Pa
India
error
4.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Inti = 3;
switch (i)
case 0+1 : printf("Geeks");
break;
case 1+2 : printf("Quiz");
break;
default: printf("GeeksQuiz");
}
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
int k=-2,J=4;
switch(k/=j/k)
{
default : printf("all are same\n");
case 0 : printf("Happy birthday\n");
case 1 : printf("A punch on the mountain");
case 2 : printf("A kick In the back\n");
}
Happy birthday
A punch on the mountain
A kick In the back
all are same
Happy birthday
A punch on the mountain
A kick In the back
A punch on the mountain
A kick In the back
Error
6.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
char ch = 'E';
switch(ch) {
case (ch>=65 &&ch<=90) : printf("Capital letter\n");
break;
case (ch>=97 &&ch<=122) : printf("Small letter\n");
break;
case (ch>=48 &&ch<=57) : printf("Digits\n");
break;
default : printf("Any other character\n");
}
Capital letter
Small letter
Digits
Error
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Int expr = 10;
switch(expr);
{
printf("This is valid output");
}
The code will throw a error
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
16 questions
Think it through
Quiz
•
University - Professi...
15 questions
Fundamentals of Algorithms - Unit 1 - Test 1
Quiz
•
University
10 questions
Dart
Quiz
•
University
10 questions
Basic Networking
Quiz
•
University
17 questions
Kiến thức về trang tính
Quiz
•
7th Grade - University
10 questions
python quiz
Quiz
•
6th Grade - Professio...
17 questions
Routing and Networking Quiz
Quiz
•
University
10 questions
FOP - CHAPTER 6
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
29 questions
Alg. 1 Section 5.1 Coordinate Plane
Quiz
•
9th Grade
22 questions
fractions
Quiz
•
3rd Grade
11 questions
FOREST Effective communication
Lesson
•
KG
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
7 questions
Fragments, Run-ons, and Complete Sentences
Interactive video
•
4th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
10 questions
DNA Structure and Replication: Crash Course Biology
Interactive video
•
11th Grade - University
5 questions
Inherited and Acquired Traits of Animals
Interactive video
•
4th Grade - University
5 questions
Examining Theme
Interactive video
•
4th Grade - University
20 questions
Implicit vs. Explicit
Quiz
•
6th Grade - University
7 questions
Comparing Fractions
Interactive video
•
1st Grade - University