Pointers from data structures and algorithms

Pointers from data structures and algorithms

University

25 Qs

quiz-placeholder

Similar activities

ByteBattle 2.0 (2)

ByteBattle 2.0 (2)

University

30 Qs

Introduction to AI (Quiz-1)

Introduction to AI (Quiz-1)

University

29 Qs

Algorithm UNIT Quiz

Algorithm UNIT Quiz

University

30 Qs

Club Excel - Core Member Recruitment 2K25

Club Excel - Core Member Recruitment 2K25

University

20 Qs

Web Development with MERN

Web Development with MERN

University

20 Qs

FUNDAMENTOS DE PYTHON 2DO PARCIAL

FUNDAMENTOS DE PYTHON 2DO PARCIAL

University

23 Qs

Techsaavy Codeathon 2k25 Round 1

Techsaavy Codeathon 2k25 Round 1

University

25 Qs

Exploring the 8086 Microprocessor

Exploring the 8086 Microprocessor

University

25 Qs

Pointers from data structures and algorithms

Pointers from data structures and algorithms

Assessment

Quiz

Engineering

University

Hard

Created by

Keertipriya Bellary

FREE Resource

25 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does a pointer in C/C++ store?

Data value

Memory address

Variable name

Function name

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which operator is used to access the value stored at the address a pointer points to?

&

*

%

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will happen if you dereference a NULL pointer?

Program runs normally

Access violation error (segmentation fault)

Returns 0

Memory is allocated automatically

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In dynamic memory allocation, which function is used in C to allocate memory?

alloc()

malloc()

new

calloc()

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a dangling pointer?

Pointer initialized to zero

Pointer that points to freed memory

Pointer pointing to a global variable

Pointer used for dynamic allocation

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you obtain the memory address of a variable in C?

Using * operator

Using & operator

Using → operator

Using % operator

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following snippet? int a = 10; int *p = &a; printf("%d", *p);

Address of a

Garbage value

10

Compile-time error

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?