
C Programming - Pointers
Quiz
•
Computers
•
University
•
Practice Problem
•
Medium
Kweh Alan
Used 5+ times
FREE Resource
Enhance your content in a minute
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

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
20 questions
Week 5: Test your understanding part 1
Quiz
•
University
13 questions
Podsumowanie: binarny, komputer, sieć
Quiz
•
7th Grade - University
15 questions
Digital Etiquette
Quiz
•
4th Grade - University
15 questions
Data Mining - Classification Mining
Quiz
•
University
20 questions
Microsoft Excel
Quiz
•
KG - Professional Dev...
20 questions
data structures1
Quiz
•
University
16 questions
Quiz on List and Tuples
Quiz
•
University
20 questions
Sistem Informasi Manajemen
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
