What is the default value of a pointer that has NOT been initialized in C?
2025
What is the default value of a pointer that has NOT been initialized in C?
- A.
NULL
- B.
-1
- C.
0
- D.
Undefined (Garbage Value)
Attempted by 79 students.
Show answer & explanation
Correct answer: D
In C, an uninitialized pointer contains a garbage value. This is because the memory location holds whatever data was previously stored there, making it unpredictable and dangerous to use without explicit initialization.