C++ pointers

C++ pointers

University

8 Qs

quiz-placeholder

Similar activities

Structure in C

Structure in C

University

10 Qs

Quiz 9: Pointer

Quiz 9: Pointer

University

12 Qs

C Pointer

C Pointer

University

7 Qs

1.1 - Computer System

1.1 - Computer System

KG - University

11 Qs

java quiz based on interface

java quiz based on interface

University

10 Qs

SDF_ˇBX_December24

SDF_ˇBX_December24

University

11 Qs

IT Quiz Round 3

IT Quiz Round 3

University

10 Qs

C - Pointers

C - Pointers

University

10 Qs

C++ pointers

C++ pointers

Assessment

Quiz

Computers

University

Hard

Created by

Shiny Verghese

Used 75+ times

FREE Resource

8 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which one of these is the indirection operator?

&

>>

<<

*

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What will be the output of this piece of code?

13

3

Syntax error

none of the given options

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What will be the output of this piece of code?

15

5

8

This is too confusing

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What will be the output of this piece of code?

Value of constant pointer (const) cannot be changed

Variable value cannot be used to initialise the pointer

12

24

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A function may return a pointer but the programmer must ensure that the pointer

still points to a valid object after the function ends

has not been assigned an address

was received as a parameter by the function

has not previously been returned by another function

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Use the delete operator only on pointers that were

never used

not correctly initialized

created with the new operator

dereferenced inappropriately

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Dynamic memory allocation occurs

when a new variable is created by the compiler

when a new variable is created at runtime

when a pointer fails to dereference the right variable

when a pointer is assigned an incorrect address

8.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What would be the output of this piece of code?

A random value such as the address of arr[1]

5

10

15