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

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

Professional Development

15 Qs

quiz-placeholder

Similar activities

pointers B

pointers B

Professional Development

16 Qs

15 dec 2023 SRMIST  TRC MCA    FN

15 dec 2023 SRMIST TRC MCA FN

Professional Development

15 Qs

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

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

Professional Development

15 Qs

091223    SASI AN

091223 SASI AN

Professional Development

15 Qs

SASI -BATCH 3-DAY2-FN

SASI -BATCH 3-DAY2-FN

Professional Development

15 Qs

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

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

Professional Development

15 Qs

VCE-BETA-17.11.2023-AN

VCE-BETA-17.11.2023-AN

Professional Development

15 Qs

VCE-GAMMA-21.11.2023-FN

VCE-GAMMA-21.11.2023-FN

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

Hard

Created by

CCC info@ccc.training

Used 1+ times

FREE Resource

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
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?