DSA-Quiz1-Pointers

DSA-Quiz1-Pointers

University

10 Qs

quiz-placeholder

Similar activities

Pemrograman & Aplikasi Mikrokontroler (Pengenalan IDE)

Pemrograman & Aplikasi Mikrokontroler (Pengenalan IDE)

11th Grade - University

10 Qs

IP Address

IP Address

10th Grade - University

11 Qs

BASIC PC COMPONENTS AND TROUBLESHOOTING  - BATCH 1

BASIC PC COMPONENTS AND TROUBLESHOOTING - BATCH 1

University

15 Qs

Test wiedzy: Tablice jednowymiarowe w C++

Test wiedzy: Tablice jednowymiarowe w C++

10th Grade - University

15 Qs

2025_PE_U4_act19

2025_PE_U4_act19

University

10 Qs

QUIZ 2 PLC

QUIZ 2 PLC

10th Grade - University

10 Qs

Digital Functional Skills

Digital Functional Skills

8th Grade - University

15 Qs

DSA-Quiz1-Pointers

DSA-Quiz1-Pointers

Assessment

Quiz

Information Technology (IT)

University

Practice Problem

Medium

Created by

Anusha T

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

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the primary purpose of a pointer in C?

To declare a new data type

To perform arithmetic operations on numbers

To store integer values

To store the memory address of another variable

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which operator is used to get the memory address of a variable?

. (dot operator)

& (address-of operator)

* (dereference operator)

-> (member access operator)

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

If `int *ptr;` is declared, what type of value can `ptr` store?

Address of a floating-point variable

An integer value

The memory address of an integer variable

A floating-point value

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the output of the following C code snippet?

int x = 10;

int p = &x;

printf("%d", *p);

The memory address of x

Error

Garbage value

10

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which of the following statements correctly initializes a pointer `ptr` to point to an integer variable `num`?

ptr = *num;

int *ptr = #

int ptr = num;

int *ptr = num;

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What will be the value of `p` after the following operations and `int` takes 4 bytes?

int arr[] = {10, 20, 30, 40, 50}; int *p = arr; p = p + 2;

The address of `arr[2]`

The address of `arr[1]`

The value `30`

The address of `arr[0]` + 2 bytes

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

char str[] = "Hello"; char *ptr = str; What is the value of *(ptr + 2)?

The memory address of 'l'

e

H

l

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?