Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a function that ask the user to enter up to a maxSize char static array. Input can be less than maxSize and is stopped
Write a function that ask the user to enter up to a maxSize char static array. Input can be less than maxSize and is stopped by entering non-alphabet letter, using the isalpha([char]) function in the cctype library. 1. Assuming the user will only enter all lower-case letter, write a function that returns the highest number of occurrences in the user input array using Q1. If two or more characters have the same number of occurrences, return the one closest to a. 2. 3. Write a function that ask the user the number of shift they want and shift the array according. Note: You CANNOT use any additional arrays. You should write a swap function. For example, if the input characters are a bcadebc a and the number of spaces to shift is 3, the output will be: b ca a b cade If the number of spaces is negative, the shift will be to the left. Write a function that combine a sorted char static array arl with size nl and a sorted char static array ar2 with size n2 and return one sorted char array of the combine of those two arrav 4. For example: ar1 [n1] {'a,,'c','e','f'); ar2[n2] ('h','d','g'); = newn]-'a, 'b' 'c', 'd', 'e', f, "g'; 5. W rite a function that ask the user for m and n where m and n is the size of the m-x-n ch matrix and lets them input into the matrix. 6. Write a function that ask the user the number of rotations they want and rotate the matrix 90 degree according. This can only be done with a square matrix. Note: You CANNOT use any additional arrays/matrix For example, if the input characters matrix is a b c d and the number of rotations is 2, the output will be d c b a
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started