C Pointers Quiz

How the Scales are Structured
Who Usually Takes This Test?
See How You Compare
Below is a preview of how scores are typically distributed across each scale.
Example Questions From the Test
- Scale by the pointed-to type: p = malloc(5 * sizeof *p);
- Request only five bytes: p = malloc(5);
- Use the size of the pointer: p = malloc(sizeof p);
- Use five pointer-address sizes: p = malloc(5 * sizeof &p);
- Dereference n with *n
- Apply array notation with n[]
- Measure the object using sizeof n
- Apply the address operator as &n
- Use swap(*a, *b), attempting to dereference the integers
- Use swap(a, b), passing the integer values directly
- Use swap(&a, &b), passing both variable addresses
- Use swap(&a, b), passing one address and one value
C Pointers Quiz - Description and methodology of the test
Readers building confidence with C can use the c pointers quiz to examine how they reason about memory addresses, indirection, and object access. It is suited to learners reviewing fundamentals, programmers checking their foundations, and anyone preparing for more reliable code. Built around short code decisions, this pointers quiz offers a focused snapshot of concepts that may deserve further practice.
What This Assessment Explores
This assessment connects C syntax with memory behavior. It covers declarations, address and dereference operators, arithmetic, arrays, structures, function arguments, qualifiers, allocation, and unsafe pointer states. Taken together, the result provides a focused study snapshot of C pointer skills.
The main thematic groups are:
- Declarations and addresses show whether you distinguish pointer types, object addresses, and dereferenced values.
- Arrays and arithmetic indicate how you relate indexing to element movement.
- Structures and functions show whether you follow linked data and pass addresses when a function changes an object.
- Allocation and safety reflect your handling of qualifiers, void pointers, null or dangling pointers, and uninitialized pointers.
The C Pointers Knowledge scale ranges from 0-16: Foundations to revisit (0-6) calls for review; Developing command (7-12) points to practice; Strong pointer basics (13-16) indicates reliable core knowledge.
Methodology and Scientific Basis
Each item presents a declaration, expression, function call, or short code fragment with four answer choices. Selecting the best alternative requires applying C rules about types, addresses, indirection, object lifetime, and memory access. The format tests code behavior rather than opinion.
The displayed output is one overall knowledge total with named bands. The score reports performance on these questions through the displayed bands rather than a norm-referenced interpretation of performance on this test. The result can guide a C pointers practice session, while writing, compiling, and debugging code test whether understanding transfers.
Content is conceptually consistent with Kernighan and Ritchie (1988), whose treatment of pointers, arrays, structures, functions, and dynamic allocation supplies the central concepts assessed here. It also aligns with Ritchie, Johnson, Lesk, and Kernighan (1978). ISO/IEC 9899:2024 and Seacord (2020) support careful treatment of qualifiers, object access, allocation, and unsafe states. This online questionnaire is a separate assessment rather than a reproduction of any of those publications.
Recent study, attention, and familiarity with multiple-choice wording can affect performance, so the result describes present performance rather than fixed ability.
- Kernighan, Brian W., and Dennis M. Ritchie. The C Programming Language. 2nd ed. Englewood Cliffs, NJ: Prentice Hall, 1988. ISBN 0-13-110362-8.
- Ritchie, Dennis M., Stephen C. Johnson, Michael E. Lesk, and Brian W. Kernighan. "UNIX Time-Sharing System: The C Programming Language." Bell System Technical Journal 57, no. 6 (1978): 1991-2019. 10.1002/j.1538-7305.1978.tb02140.x.
- ISO/IEC 9899:2024. Information technology - Programming languages - C. 5th ed. Geneva: International Organization for Standardization, 2024.
- Seacord, Robert C. Effective C: An Introduction to Professional C Programming. San Francisco: No Starch Press, 2020. ISBN 978-1-7185-0104-1.
Updated: