troubleshooting Question

a C++ program (arrays and pointers)

Avatar of siddhuoops
siddhuoops asked on
4 Comments1 Solution328 ViewsLast Modified:
Hi all,
       I have this program to write in C++ and I have no idea how I should do it. Here is the details:
             I have to write a C++ program that allows the user to enter 100 integer data values to fill up an array, and then does the following. Introduce three pointers(to int) p, q and r. Set p and r to point to the first entry in the array. Set q to point just beyond the last entry in the array. Without introducing any integer variables, set up a loop in which p is incremented until it also points just beyond the end of the array. Also (inside the loop), whenever p points to a number that is bigger than the number r points to, then change r so that it also points to the same number p points to.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros