A Place for Latest Exam wise Questions, Videos, Previous Year Papers, Study Stuff for MCA Examinations - NIMCET
Previous Year Question (PYQs)
2
Which C expression correctly represents this statement:
“It decrements pointer p before fetching the character that p points to.”
Solution
Solution:
- `p--` → post-decrement (use then decrement)
- `--p` → pre-decrement (decrement then use)
Here, we need to **decrement p first**, then fetch the value it points to.
Hence, correct expression: `*--p`
Online Test Series, Information About Examination, Syllabus, Notification and More.