Q38.Marks: +2.0UGC NET Paper 2: Computer Science 8th Oct 2022
Pointers cannot be used to
1.find the address of a variable in memory
2.reference value directly✓ Correct
3.simulate call by reference
4.manipulate dynamic data structure
Solution
The correct answer is option 2) reference value directly.
Key Points
Option 1 – Find the address of a variable in memory: ✅ Pointers are designed to store the address of a variable using the & (address-of) operator.
Option 2 – Reference value directly: ❌ Pointers do not reference values directly. To access the value at the memory address, you must use the * (dereference) operator. Hence, this is not a direct operation.
Option 3 – Simulate call by reference: ✅ In languages like C and C++, pointers are used to pass variables by address to functions, effectively simulating call by reference.
Option 4 – Manipulate dynamic data structure: ✅ Pointers are crucial for managing dynamic data structures such as linked lists, trees, and graphs.
Additional Information
Pointers are a powerful tool in programming for indirect access to variables.
However, they require explicit dereferencing to access the value stored at the memory location they point to.
Hence, the correct answer is:option 2) reference value directly