Write a C++ program that declares int variables x, y, z and int* pointer variables p, q,
Fantastic news! We've Found the answer you've been seeking!
Question:
Write a C++ program that declares int variables x, y, z and int* pointer variables p, q, r. Set x, y, z to three different values. Set p, q, r to the addresses of x, y, z respectively.
- Print with labels the values of x, y, z, p, q, r, *p, *q, *r.
- Print the message: Swapping values.
- Execute the swap code: z = x; x = y; y = z;
Related Book For
Posted Date: