Module1_Quiz

Module1_Quiz

University

20 Qs

quiz-placeholder

Similar activities

SENATIC Parcial Guía 3_PseInt

SENATIC Parcial Guía 3_PseInt

10th Grade - University

15 Qs

Microsoft Excel

Microsoft Excel

University

15 Qs

Lección1 - JavaScript

Lección1 - JavaScript

1st Grade - Professional Development

17 Qs

Arduino Loop

Arduino Loop

2nd Grade - University

20 Qs

'C'Programming Basics - Prepared by Feroz Khan A.B

'C'Programming Basics - Prepared by Feroz Khan A.B

University

15 Qs

Python MCQ

Python MCQ

University

20 Qs

PSTS INFORMATIKA X

PSTS INFORMATIKA X

10th Grade - University

20 Qs

Bases de Datos

Bases de Datos

University

19 Qs

Module1_Quiz

Module1_Quiz

Assessment

Quiz

Computers

University

Hard

Created by

Guruvammal S

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

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a characteristic of static arrays?

Size can be changed at runtime

Size must be known at compile time

Memory is allocated dynamically

None of the above

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you initialize an array in C?

int arr(5) = {1, 2, 3};

int arr[5] = {1, 2, 3};

int arr = {1, 2, 3};

int arr[5];

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code? int arr[] = {1, 2, 3}; printf("%d", arr[1]);

1

2

3

Compilation error

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a pointer in C?

A variable that holds data values.

A variable that holds the address of another variable.

A type of function.

A type of array.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which operator is used to access the value at the address stored in a pointer? int* ptr; What operator should be used?

&

*

->

[]

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If you have an integer variable x, how do you assign its address to a pointer p? int x; What should be done?

&x

*x

x

x&

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will happen if you dereference an uninitialized pointer? int* p; printf("%d", *p); What type of error will occur?

Syntax error

Runtime error (undefined behavior)

Compilation error

No error; it will print garbage value.

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?