
C Programming - Pointers

Quiz
•
Computers
•
University
•
Medium
Kweh Alan
Used 5+ times
FREE Resource
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.
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
Assignment Quiz-2

Quiz
•
University
13 questions
Revision 2 MCA

Quiz
•
University
16 questions
Linked List and Arrays in JAVA

Quiz
•
University
16 questions
DS - Linked List - S1

Quiz
•
University
20 questions
Application Software - Revision Quiz

Quiz
•
University
20 questions
Arquitectura de computadoras I

Quiz
•
University
20 questions
Set - 2

Quiz
•
University
15 questions
Simple Minds Quiz

Quiz
•
University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University