Switch (Quiz - 4)

Switch (Quiz - 4)

University

15 Qs

quiz-placeholder

Similar activities

SOAL PTS 1 KOMPUTER AKUNTANSI KELAS XI

SOAL PTS 1 KOMPUTER AKUNTANSI KELAS XI

11th Grade - University

10 Qs

Pemkom 8

Pemkom 8

University

10 Qs

Machine Learning

Machine Learning

University

20 Qs

Algoritma Pemrograman

Algoritma Pemrograman

University

20 Qs

Post Test #4 - Python Fundamental #3

Post Test #4 - Python Fundamental #3

University

10 Qs

DL Refresher

DL Refresher

KG - Professional Development

10 Qs

Quiz3_DivideConquer_GreedyApproach

Quiz3_DivideConquer_GreedyApproach

University

10 Qs

Kuis Pemrograman Dasar

Kuis Pemrograman Dasar

University

20 Qs

Switch (Quiz - 4)

Switch (Quiz - 4)

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

Kunal Goyal

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

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");

}

The program will print 'Geeks'
The program will print 'Quiz'
The program will print 'GeeksQuiz'
The program will not print anything

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");

}

Geeks
Quiz
GeeksQuiz
None of the above

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 print 'This is valid output'

The code will throw a error

The code will print nothing
The code will print 'expr'

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?