Aspire's Library

A Place for Latest Exam wise Questions, Videos, Previous Year Papers,
Study Stuff for MCA Examinations - NIMCET

Previous Year Question (PYQs)



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.

Click Here to
View More


Online Test Series,
Information About Examination,
Syllabus, Notification
and More.

Click Here to
View More

Ask Your Question or Put Your Review.

loading...