C Programming - Pointers

C Programming - Pointers

University

16 Qs

quiz-placeholder

Similar activities

Review Quiz (Chapter 3&4)

Review Quiz (Chapter 3&4)

University

20 Qs

C Programming Unit-1 Test-2

C Programming Unit-1 Test-2

University

20 Qs

Jarkom

Jarkom

1st Grade - Professional Development

11 Qs

quiz pertemuan 2 asik ddp

quiz pertemuan 2 asik ddp

University

15 Qs

QUIZ 1: REVIEW ON C

QUIZ 1: REVIEW ON C

University

15 Qs

Chapter 2: Input Device

Chapter 2: Input Device

12th Grade - University

12 Qs

QUIZ 2

QUIZ 2

University

20 Qs

ประกอบคอมพิวเตอร์

ประกอบคอมพิวเตอร์

University

20 Qs

C Programming - Pointers

C Programming - Pointers

Assessment

Quiz

Computers

University

Practice Problem

Medium

Created by

Kweh Alan

Used 5+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

16 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

The definition:

int *countPtr, count;

specifies that countPtr and count are of type int* —each is a pointer to an integer.

True

False

Answer explanation

Actually, count is an int, not a pointer to an int. The * applies only to countPtr and does not distribute to the other variable(s) in the definition.

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

A pointer may be initialized to NULL, 0 or an address.

True

False

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Initializing a pointer to 0 is equivalent to initializing a pointer to NULL, but 0 is preferred.

True

False

Answer explanation

Actually, NULL is preferred because it highlights the fact that the variable is of a pointer type.

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

The only integer that can be assigned directly to a pointer variable is 0.

True

False

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Initialize pointers to prevent unexpected results.

True

False

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Assuming the definitions

double d = 98.6;

double *dPtr;

the following statement assigns variable d’s address to the pointer variable dPtr:

dPtr = &d;

Variable dPtr is then said to “point to” d.

True

False

7.

FILL IN THE BLANK QUESTION

1 min • 1 pt

The unary indirection operator (*) returns the value of the object to which its pointer operand points. Using * in this manner is called ______________ a pointer.

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?

Discover more resources for Computers