Write a function named twomax

Topsolutions
 (Not rated)
 (Not rated)
Chat

1,Write a function named twomax that takes a pointer to an array of integer numbers, array size, a pointer to

integer which is the index of the first maximum, and another pointer to integer which is the index of the

second maximum as parameters. The function should find and return the index (subscript or position) of the first maximum element and the index of the second maximum element in the array of integers. The function prototype is: void twomax(int *array,int size,int * p1,int *p2);

write a main to test twomax function.
2,Write a program that asks the user to enter names of students and store them in an array of

strings. Define a pointer that pointed to the array. The program should stop accepting the names when the name entered is” 999”. After that, the

program should ask the user to enter a character and then the program should print all the names that start

with the entered character. The maximum number of students is 100. Use the pointer to access the array elements.

    • 12 years ago
    complete solution
    NOT RATED

    Purchase the answer to view it

    • studentpointer.cpp
    • twomax.cpp