Search Header Logo

DSTR Week 4 Revision Question

Authored by Chong May

Computers

University

Used 11+ times

DSTR Week 4 Revision Question
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the output of the following code snippet?

5

0

Compilation error

Undefined behavior

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Given the array int arr[5] = {10, 20, 30, 40, 50};,
what will be the result of sizeof(arr) / sizeof(arr[0])?

4

5

10

20

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If you have an array int arr[10];, what is the index of the middle element?

4

5

6

It depends on how the user has defined it.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the output of the following code snippet?

3

4

6

8

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the output of the following code snippet?

1

3

4

5

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the output of the following code snippet?

Address of x

10

Address of ptr

Compilation error

Garbage value
(random, undefined, or uninitialized value)

7.

FILL IN THE BLANK QUESTION

1 min • 1 pt

Media Image

What will be the output of the following code snippet?

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?