IGDTUW 2025 — Computer PYQ
IGDTUW | Computer | 2025Conceptually, what is a 'Pointer'?
Choose the correct answer:
- A.
A special type of error message.
- B.
A variable that holds a memory address.
(Correct Answer) - C.
A tool used to draw shapes on the screen.
- D.
A command that ends the program.
A variable that holds a memory address.
Explanation
The correct answer is (b) A variable that holds a memory address.
Explanation
In programming languages like C and C++, a pointer is a powerful variable type that does not store a direct value (like an integer or a character). Instead, it stores the memory address of another variable. By holding this address, a pointer allows the program to "point" to the location of data in the computer's memory, enabling indirect access and manipulation of that data.
Conceptual Mathematical Representation
If we represent the memory address of a variable V as Address(V), then a pointer P can be defined as:
P=Address(V)
To access the value stored at that specific address (a process called dereferencing), we use:
Value(P)=∗P=V
Where V is the data value stored at that memory location.
