C Programming Quiz

C Programming Quiz

12th Grade

10 Qs

quiz-placeholder

Similar activities

Python List

Python List

4th Grade - University

15 Qs

BÀI 1. LỚP 7

BÀI 1. LỚP 7

11th Grade - University

10 Qs

1.1.1 The structure and function of the processor

1.1.1 The structure and function of the processor

11th Grade - University

15 Qs

Характеристики зображення та засобів його відтворення

Характеристики зображення та засобів його відтворення

1st - 12th Grade

12 Qs

A level Computer Science In-fix post-fix Reverse polish

A level Computer Science In-fix post-fix Reverse polish

10th Grade - University

10 Qs

Identifying devices

Identifying devices

12th Grade

11 Qs

COMPUTER PROGRAMMING Q2_FLOWCHART (2 points each)

COMPUTER PROGRAMMING Q2_FLOWCHART (2 points each)

11th - 12th Grade

10 Qs

Basics of spreadsheet

Basics of spreadsheet

12th Grade

15 Qs

C Programming Quiz

C Programming Quiz

Assessment

Quiz

Computers

12th Grade

Practice Problem

Hard

Created by

Arteng undefined

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...

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

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?