Pointers cannot be used to

  1. find the address of a variable in memory
  2. reference value directly
  3. simulate call by reference
  4. manipulate dynamic data structure

Answer (Detailed Solution Below)

Option 2 : reference value directly

Detailed Solution

Download Solution PDF

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

Get Free Access Now
Hot Links: teen patti real cash teen patti jodi teen patti sweet teen patti 50 bonus