Question: Code in C, please. Concepts to Practice Pointers Simulated pass by reference via pointers Strings Relationship of pointers to arrays Description For the prelab assignment,
Code in C, please.


Concepts to Practice Pointers Simulated "pass by reference" via pointers Strings Relationship of pointers to arrays Description For the prelab assignment, you need to implement a program that issues prompts and takes in data from the user inside various functions. There are special rules in this assignment to make sure you pass variables back and forth between your functions and the main() function: You may not call scanf() from your main() function. You may not use global variables. The variables you print out at the end must all be declared in your main() function. All of your functions must have a void return type, except as described below. The main() function in your program should: 1. Print a message welcoming the user to Prelab 8. 2. Call a function to get an integer and a floating point variable from the user. 3. Call a function to get a string from the user. 4. Call a function to get an integer array from the user. 5. Print out all of the values that the user entered. Functions You Must Write You may write any functions you wish to implement this program, but there must be a function to get an integer and a float, a function to get a string, and a function to get an array. To get the array, you must write a function with the following prototype: int GetInteger array(int * output IntArray, int maxsize); The GetintegerArray() function should return the actual number of array elements entered. Its parameters are the location in memory where it should begin filling in the array elements (outputintArray), and the maximum number of elements (maxsize) that you can enter (so you won't run off the end of the array). Sample Output jimreJimRarea51:-/C51050/SP2021/1abs/1ab8s compile prelabs.c jimr@imrArea51:-/C51050/SP2021/1abs/1ab8$ ./a.out : * Welcome to Prelab 8 * Please enter an integer followed by a space followed by a float and then hit enter: 17 47.12 Please enter a string without spaces and then hit enter: M-I-Z-2-0-U How many integers would you like to input? 3 Enter integer #1: -15 Enter integer #2: 23 Enter integer #3: 32768 : | Yau entered 17:47.12 M-I-Z-2-2-U Array elements: array[O]=-15 array[1] =23 array[2]=32768
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
