Search Header Logo

PCDS Lab Quiz

Authored by Debi Mishra

Computers

University

Used 1+ times

PCDS Lab Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

char txt [20] = “Hello world!\0”;

How many bytes are allocated by the definition above?

11 bytes

12 bytes

13 bytes

20 bytes

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which one of the following statements allocates enough space to hold an array of 10 integers that are initialized to 0?

int ptr = (int ) malloc(10, sizeof(int));

int ptr = (int ) calloc(10, sizeof(int));

int ptr = (int ) malloc(10*sizeof(int));

int ptr = (int ) alloc(10*sizeof(int));

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What will be output if you will execute following c code?

20

11

12

22

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What will be the output of the given code?

c questions

c (null)

(null) (null)

Compilation error

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What will be the output of the given code?

4

24

25

Infinite loop

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?