Question: Write a function that takes in inputs int *p, int n, and int T where p is (points to) an array of size n, and
Write a function that takes in inputs int *p, int n, and int T where p is (points to) an array of size n, and T is a number. You can assume that the array has been generated correctly. The function outputs (returns) an integer that is equal to the number of times T appears in the array. For example, if the array is [1, 6, 8, 3, 8, 5, 7, 6, 8], and T = 8, then the function returns3 because 8 appears 3 times in the array. For the same array, if T = 6, then the function returns 2 because 6 only appears 2 times in the array. Write a boolean function that determines whether an array is sorted in the (strictly) ascending order or not. The function takes in inputs int *p, int n where p is (points to) an array of size n. The function returns true or false. For example, if the array is [1, 2, 3, 4, 5, 6], then the function returns true. If the array is [1, 3, 2, 4, 5, 2], then the function returns false. You should name these functions and specify their inputs and outputs. Please do not name the functions with bad tastes
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
