Pointer Subtraction

Pointer Subtraction - p and q 8 Pointer Subtraction •...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
8: Pointer Subtraction Given two pointers, p and q , such that: both pointers are of the same type, p > q both point to objects in a single memory block , the expression p - q yields the number of objects between
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: p and q , 8: Pointer Subtraction • Find the first occurrence of the value in a block of doubles • ( EOF if not found): • int position; • double *p, *pi; • /* p initialized */ • ... •...
View Full Document

This note was uploaded on 02/18/2012 for the course CS 240 taught by Professor Rego during the Fall '08 term at Purdue.

Page1 / 2

Pointer Subtraction - p and q 8 Pointer Subtraction •...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online