engineering computer science MCQ #2177

What does `const` mean for a pointer?

engineering computer science MCQ #2177

  1. Question 1

    Q1. What does `const` mean for a pointer?

    • A) Pointer cannot be changed
    • B) Data pointed to cannot be changed
    • C) Both pointer and data are constant
    • D) It depends on the placement of const

    Answer: It depends on the placement of const

    Explanation: const can be applied to either the pointer, the data it points to, or both, depending on its placement.