Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Coding Questions 1- Write a function that gets an array as a parameter (address and size) and a number and checks to see if that

image text in transcribed

Coding Questions 1- Write a function that gets an array as a parameter (address and size) and a number and checks to see if that number exists in the array. The function should report every single occurrence of the number in the array. It should also report how many occurrences were detected in total Suggested prototype: void findnReport (int* ar, int size, int num) Example of function output: If array = {2,5, 3, 5, 12, 13, 14, 15,0,5,-1, 11,5) and num = 5, Number 5 found in array index 1 Number 5 found in array index 3 Number 5 found in array index 9 Number 5 found in array index 12 Total of 4 occurrences of number 5 2- Write a function that gets an array as a parameter, sorts it in an ascending fashion and returns the number of elements that did not change position in the sort (they were originally in the right position). int sortASC(int* mcraz, int size) if array: 2.3,1,0,-1} after calling the function the array should become {-1,0, 1, 2, 3 }and the function should return 1 (only one element has not changed place in the array) 3- Develop a program that gets a string from the user and prints it in the reverse order. Use a safe gets/scanf to make sure the user doesn't mess up memory. Assume that the maximum characters allowed for the string is 200 character 4- Write a function that gets a string as a parameter and reports (prints out) the number of lower case and upper-case characters in the string. The output should look like Your string has 200 characters, 120 of them are lower case and 25 of them are upper case alphabet letters. The allowed length for the string is 200 5- Write a function void printTriangle char* str) that gets a string from the user up to length 20 and prints in in the following triangle format If the user enters "Hello" the code should print H He Hel Hell Hello

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Horse Betting The Road To Absolute Horse Racing 2

Authors: NAKAGAWA,YUKIO

1st Edition

B0CFZN219G, 979-8856410593

More Books

Students also viewed these Databases questions

Question

2. What type of team would you recommend?

Answered: 1 week ago