- Define a macro by the name max with a size of 100 as follows:
#define max 100
- Define a p integer array of a max size, as demonstrated in the following code:
int p[max]
- Specify the number of elements in the array as follows:
printf("How many elements are there? ");scanf("%d", &n);
- Enter the elements for the array as follows:
for(i=0;i<n;i++) scanf("%d",&p[i]);
- Define two mx and ptr pointers to point at the first element of the array as follows:
mx=p;ptr=p;
- The mx pointer will always point at the maximum value of the array, whereas the ptr pointer will be used for comparing the remainder of the values of the array. If the value pointed to by the mx pointer is smaller than the value pointed at by the ptr pointer, the ...