SASI -1st year -DAY1-AN(19.12.23)

SASI -1st year -DAY1-AN(19.12.23)

Professional Development

15 Qs

quiz-placeholder

Similar activities

Cricket

Cricket

Professional Development

10 Qs

Demonstrative pronouns

Demonstrative pronouns

Professional Development

20 Qs

VCE-GAMMA-21.11.2023-FN

VCE-GAMMA-21.11.2023-FN

Professional Development

15 Qs

ISO 9001:2015 RISK AND OPPORTUNITY MANAGEMENT

ISO 9001:2015 RISK AND OPPORTUNITY MANAGEMENT

Professional Development

19 Qs

SP4 unit 4-8 - end of year revision

SP4 unit 4-8 - end of year revision

Professional Development

17 Qs

15 dec 2023 SRMIST  TRC MCA    FN

15 dec 2023 SRMIST TRC MCA FN

Professional Development

15 Qs

ปรับพื้่นฐานภาษาอังกฤษ

ปรับพื้่นฐานภาษาอังกฤษ

Professional Development

10 Qs

UI1: S3 (habits)

UI1: S3 (habits)

Professional Development

15 Qs

SASI -1st year -DAY1-AN(19.12.23)

SASI -1st year -DAY1-AN(19.12.23)

Assessment

Quiz

English

Professional Development

Practice Problem

Hard

Created by

CCC info@ccc.training

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

1 min • 1 pt

#include <stdio.h> void main() { int ch; printf("enter a value between 1 to 2:"); scanf("%d", &ch); switch (ch) { case 1: printf("1\n"); default: printf("2\n"); } }

1
2
1 2
Run time error

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

#include <stdio.h> void main() { int ch; printf("enter a value between 1 to 2:"); scanf("%d", &ch); switch (ch) { case 1: printf("1\n"); break; printf("hi"); default: printf("2\n"); } }

1
hi 2
Run time error
2

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

#include <stdio.h> int main() { int a = 1, b = 1; switch (a) { case a*b: printf("yes "); case a-b: printf("no\n"); break; } }

yes
no
Compile time error
yes no

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

#include <stdio.h> int main() { int x = 97; switch (x) { case 'a': printf("yes "); break; case 97: printf("no\n"); break; } }

yes
yes no
Duplicate case value error
character case value error

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

#include <stdio.h> int main() { float f = 1; switch (f) { case 1.0: printf("yes\n"); break; default: printf("default\n"); } }

yes
yes defined behaviour
undefined behaviour
compile time error

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

#include <stdio.h> #define max(a) a int main() { int x = 1; switch (x) { case max(2): printf("yes\n"); case max(1): printf("no\n"); break; } }

yes no
yes
no
compile time error

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

#include <stdio.h> int main() { switch (printf("Do")) { case 1: printf("First\n"); break; case 2: printf("Second\n"); break; default: printf("Default\n"); break; } }

Do
DoFirst
DoSecond
DoDefault

Create a free account and access millions of resources

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?