
Switch (Quiz - 4)

Quiz
•
Computers
•
University
•
Hard
Kunal Goyal
Used 1+ times
FREE Resource
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
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
C-QUEST QUIZ BEE

Quiz
•
University
16 questions
A "C" Event-the backbone of modern coding.

Quiz
•
University
20 questions
Seguridad Digital

Quiz
•
University - Professi...
16 questions
PSC ALM QUIZ

Quiz
•
University
20 questions
EST102 : PROGRAMMING IN C TEST 1

Quiz
•
University
12 questions
OS with C programming

Quiz
•
University
20 questions
AlgoProg - Review Quiz

Quiz
•
University
12 questions
C Basics

Quiz
•
University
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
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University