Aadhya-Quiz-C-Programming

Aadhya-Quiz-C-Programming

University

30 Qs

quiz-placeholder

Similar activities

A+102

A+102

10th Grade - University

25 Qs

IT202 Midterm

IT202 Midterm

University

25 Qs

BAB 1: PENGENALAN KEPADA KOMPUTER DAN TEKNOLOGI MAKLUMAT

BAB 1: PENGENALAN KEPADA KOMPUTER DAN TEKNOLOGI MAKLUMAT

University

25 Qs

PreTest Pelatihan Arduino dan IoT

PreTest Pelatihan Arduino dan IoT

University

25 Qs

Komputer Akuntansi

Komputer Akuntansi

University

25 Qs

Kisi-kisi Propper April 2019 Part 2

Kisi-kisi Propper April 2019 Part 2

University

25 Qs

Understanding Input, Selection and Loops in Python

Understanding Input, Selection and Loops in Python

7th Grade - University

25 Qs

QUIS APLIKASI PERKANTORAN

QUIS APLIKASI PERKANTORAN

University

25 Qs

Aadhya-Quiz-C-Programming

Aadhya-Quiz-C-Programming

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

Buddie Buddie

Used 3+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

30 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

a) 9 9 9 9

b) 10 10 10 10

c) 9 10 11

d) 10 11 12

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is an advantage of using switch statements over multiple if-else

statements in C?

Switch statements provide better readability

Switch statements support complex logical conditions

Switch statements offer better performance in all cases

Switch statements are more flexible in handling exceptions

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

#include <stdio.h>

int main()

{

int x = 5;

int y = 10;

int z = (x > y) ? (x++) : (y++);

printf("%d %d %d", x, y, z);

}

5 10 5

5 11 10

6 10 5

11 6 10

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following correctly demonstrates the usage of a

nested ternary operator?

(x > y) ? (x > z) ? x : z : (y > z) ? y : z

(x > y) ? (x > z) ? x : (y > z) ? y : z : x

(x > y) ? (x > z) ? x : (y > z) ? y : z : z

(x > y) ? (x > z) ? x : (y > z) ? z : y : x

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What value will x hold if a = 3 and b = 5?

x = (a > b) ? (a 2) : ((b > a) ? (b 2) : (a + b));

6

8

10

15

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

int main()

{

int x = 1, z[2] = {10, 11};

int *p = NULL;

p = &x;

*p = 10;

p = &z[1];

*(&z[0] + 1) += 3;

printf("%d, %d, %d\n", x, z[0], z[1]);

return 0;

}

1 10 11

10 10 14

10 14 11

1 10 14

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

int main() {

int a[] = {2, 4, 6, 8, 10};

int i, sum = 0, *b = a + 4;

for (i = 0; i < 5; i++)

sum = sum + (*b - i) - *(b - i);

printf("%d\n", sum);

}

8

10

11

16

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?