miscon:programming.variables.uninitialized-is-zero · draft · trust low · v0.1.1 · kind overgeneralization

Uninitialised variables start at zero

A variable that has been declared but never assigned holds zero, or an empty value, so it can be safely read or added to.

Stable URI
https://open-misconceptions.github.io/miscon-data/m/programming.variables.uninitialized-is-zero
UUID
436c64f5-62ac-40c8-86f7-60b05c57c1de
Domain
programming.variables
Level band
secondary, undergraduate
Locale
en
About
https://open-misconceptions.github.io/miscon-data/c/programming.variables.initialization (Miscon)

Evidence patterns

Pattern 0: predict the outcome of reading a declared but unassigned local variable

predicts 0 or empty output rather than a compile error or garbage value

Itemint count; count = count + 1; System.out.println(count);
ExpectedCompile error: count might not have been initialized
Response1

Discriminators

vs a slip. A slip is forgetting one initialisation while knowing it is needed. The belief is stated ('it starts at zero') and the learner omits initialisation habitually.

Relations

conflicts_with
A variable has no usable value until it is assigned (external)
resolved_by
A variable has no usable value until it is assigned (external)

Alignments

Provenance

Origin: llm-drafted

  1. Chiodini, L., Moreno Santos, I., Gallidabino, A., Tafliovich, A., Santos, A. L., & Hauswirth, M. (2021). A curated inventory of programming language misconceptions. In Proceedings of the 26th ACM Conference on Innovation and Technology in Computer Science Education (ITiCSE '21), 380-386. doi:10.1145/3430665.3456343
    Inventory consulted for the misconception name and scope only; progmiscon publishes no licence for its text, so Open Misconceptions' statements and examples are written independently.
  2. Kaczmarczyk, L. C., Petrick, E. R., East, J. P., & Herman, G. L. (2010). Identifying student misconceptions of programming. In Proceedings of the 41st ACM Technical Symposium on Computer Science Education (SIGCSE '10), 107-111. doi:10.1145/1734263.1734299
    Memory-model misconceptions including uninitialised storage.
  3. Qian, Y., & Lehman, J. (2017). Students' misconceptions and other difficulties in introductory programming: A literature review. ACM Transactions on Computing Education, 18(1), Article 1. doi:10.1145/3077618

Drafted from the cited literature for the Open Misconceptions seed pack; statement, examples and discriminators are original text. Awaiting maintainer review.

Review status

Status draft, trust low (computed from the reviews below against the reviewer registry).

No reviews yet.

Formats

Cite

miscon:programming.variables.uninitialized-is-zero
https://open-misconceptions.github.io/miscon-data/m/programming.variables.uninitialized-is-zero