February 2020
Beginner to intermediate
616 pages
15h 16m
English
Define an array of a certain size and enter a few elements in it. These will be the values among which we want to find the largest value. After entering a few elements, the array might appear as follows:

We will use two pointers for finding the largest value in the array. Let's name the two pointers mx and ptr, where the mx pointer will be used to point at the maximum value of the array, and the ptr pointer will be used for comparing the rest of the array elements with the value pointed at by the mx pointer. Initially, both the pointers are set to point at the first element of the array, p[0], as shown in the following ...
Read now
Unlock full access