C Programming Quiz

C Programming Quiz

12th Grade

10 Qs

quiz-placeholder

Similar activities

พื้นฐานการเขียนโปรแกรมคอมพิวเตอร์

พื้นฐานการเขียนโปรแกรมคอมพิวเตอร์

12th Grade

6 Qs

OOP - Java Classes

OOP - Java Classes

12th Grade - University

15 Qs

DOMANDE SEMPLICI SUL LINGUAGGIO C

DOMANDE SEMPLICI SUL LINGUAGGIO C

12th Grade

8 Qs

ICT C 語言1

ICT C 語言1

9th - 12th Grade

10 Qs

pemograman

pemograman

12th Grade

10 Qs

Arrays += Chan

Arrays += Chan

9th - 12th Grade

12 Qs

Python Basics Quiz 1

Python Basics Quiz 1

8th Grade - University

15 Qs

Quiz Bahasa Pemrograman C input dan print

Quiz Bahasa Pemrograman C input dan print

12th Grade

13 Qs

C Programming Quiz

C Programming Quiz

Assessment

Quiz

Computers

12th Grade

Hard

Created by

Arteng undefined

Used 1+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Find the output of the following program void main() { int i; i=1; i=1+2*i++; printf("%d",i); }

3

5

6

4

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following C code considering the size of a short int is 2, char is 1 and int is 4 bytes? #include int main() { short int i = 20; char c = 97; printf("%d, %d, %d\n", sizeof(i), sizeof(c), sizeof(c + i)); return 0; }

2, 1, 2

2, 1, 1

2, 1, 4

2, 2, 8

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following program? #include main() { int i = 13, j = 60; i ^= j; j ^= i; i ^= j; printf("%d %d", i, j); }

73 73

60 13

- 13 60

- 60 60

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will the following switch statement print if the character input is y? char c=’y’; scanf("%c",&c); switch( c ) { case ‘Y’: printf(“Yes/No”); case ‘N’: printf(“No/Yes); break; default: printf(“other”); }

Yes/NoNo/Yes

No/Yes

other

compilation error

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following program #include int main() { int y; y=1!=2>5&&0!=5<8; printf("%d",y); return 0; }

1

0

error

garbage value

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following program #include int main() { int y; y=5<8?1!=2<5==0?10:20:30; printf("%d",y); return 0; }

10

20

30

1

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the program? #include int main() { int i=-3, j=2, k=0, m; m = ++i && ++j && ++k; printf("%d, %d, %d, %d\n", i, j, k, m); return 0; }

-2, 3, 1, 1

2, 3, 1, 2

1, 2, 3, 1

3, 3, 1, 2

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?