C Programming Quiz level 2

C Programming Quiz level 2

1st Grade

15 Qs

quiz-placeholder

Similar activities

Kuis SQL Dasar

Kuis SQL Dasar

1st Grade

10 Qs

Тест

Тест

1st - 5th Grade

10 Qs

TEST VERBS +ing

TEST VERBS +ing

1st - 5th Grade

10 Qs

LINGUISTIC VARIETIES & MULTILINGUAL NATIONS & CREOLES & PIDGINS

LINGUISTIC VARIETIES & MULTILINGUAL NATIONS & CREOLES & PIDGINS

1st Grade

20 Qs

CCTV DASAR

CCTV DASAR

1st - 5th Grade

20 Qs

Soalan Bahasa Arab

Soalan Bahasa Arab

1st Grade - University

13 Qs

C Programming Challenge for Students

C Programming Challenge for Students

1st Grade

16 Qs

General Theory of Relativity

General Theory of Relativity

1st Grade

10 Qs

C Programming Quiz level 2

C Programming Quiz level 2

Assessment

Quiz

Others

1st Grade

Practice Problem

Hard

Created by

Kaustubh Pandey

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

30 sec • 1 pt

What will be the output of the following code? #include int main() { int a = 5; int *p = &a; *p += *p * 2; printf("%d\n", a); return 0; }

5

10

15

20

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code? #include int main() { int arr[] = {10, 20, 30, 40, 50}; int *ptr = arr + 2; printf("%d\n", *ptr); return 0; }

10

20

30

40

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code? #include void update(int x) { x = x * 2; } int main() { int a = 10; update(a); printf("%d\n", a); return 0; }

10

20

0

Compilation Error

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code? #include int main() { int x = 5; // binary: 0101 int y = 9; // binary: 1001 printf("%d\n", x ^ y); return 0; }

12

14

4

0

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code? #include int main() { int arr[2][2] = {{1, 2}, {3, 4}}; printf("%d\n", *(*(arr + 1) + 1)); return 0; }

1

2

3

4

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code? #include int main() { char *ptr = "Hello"; ptr += 3; printf("%s\n", ptr); return 0; }

Hello

lo

llo

Syntax Error

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code? #include int main() { int a = 1, b = 0, c = 3; if (a || ++b && c) { c += a; } printf("%d\n", c); return 0; }

3

4

5

Compilation Error

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

Already have an account?