PLEASE GIVE IT A THUMBS UP, I SERIOUSLY NEED ONE

#include <iostream>
using namespace std;
void InitArray(double *arr, int SIZE){
cout<<"\nPlease enter 5 values for the array:"<<endl;
for(int i=0;i<SIZE;i++){
cin>>arr[i];
}
}
float roundoff(double var)
{
double value = (int)(var * 10 + .5);
return (double)value / 10;
}
bool isWhole(double num)
{
return num == static_cast<int>(num);
}
void DispRevArray(double *arr, int SIZE){
cout<<"\nThe array you entered in reverse is: ";
for(int i=SIZE-1;i>=0;i--){
if(isWhole(arr[i]))
cout<<arr[i]<<".0"<<" ";
else
cout<<roundoff(arr[i])<<" ";
}
cout<<endl;
}
int main(int argc, char const *argv[])
{
double arr[5];
double *p = arr;
cout<<"This is the address of the array: "<<&arr<<endl;
cout<<"This is the address of where the pointer is pointing to: "<<p<<endl;
cout<<"This is the address of the pointer: "<<&p<<endl;
InitArray(p,5);
DispRevArray(p,5);
return 0;
}

Here's an assignment that'll give you some practice with pointers. All you have to do is...
IN C++ ADD COMMENTS AS MUCH AS POSSIBLE Exercise 1: Duplicate the Arrays Suppose you are developing a program that works with arrays of integers, and you find that you frequently need to duplicate the arrays. Rather than rewriting the array-duplicating code each time you need it, you decide to write a function that accepts an array and its size as arguments. Creates a new array that is a copy of the argument array, and returns a pointer to the...
- Write a program that performs several operations on an array of positive ints. The program should prompt the user for the size of the array (validate the size) and dynamically allocate it. Allow the user to enter the values, do not accept negative values in the array. - Your program should then define the functions described below, call them in order, and display the results of each operation: a) reverse: This function accepts a pointer to an int array...
Create qz5.c to include all of the following function prototypes: void check1(char *, char, int *); void check2(char *, char, int *); void display(char, int); Then, implement main() to perform the tasks below: Define a 10-element char array with initial values of any lower case letters of your selection. Values can duplicate. Define a pointer that points to the above array. Print the array completely with double spaces before each character. See screenshot below for a sample. Call check1() with...
Hello I need help with this program. Should programmed in C!
Program 2: Sorting with Pointers Sometimes we're given an array of data that we need to be able to view in sorted order while leaving the original order unchanged. In such cases we could sort the data set, but then we would lose the information contained in the original order. We need a better solution. One solution might be to create a duplicate of the data set, perhaps make...
Rewrite the program you submitted for A8 to use pointers, pointer notation and arithmetic, etc. as follows: If you did not complete A8, you will need to start with those instructions, and then, change your code based on the instructions here The main() function should: Create a fixed or dynamic array, e.g., double grade[SIZE] or double *grade = malloc(...) or calloc(...) Concerning the function call for getData(), pass the address of the array and its size to pointers; depending on...
IN C PROGRAMMING, NOT C++ Rewrite the program you submitted for A8 to use pointers, pointer notation and arithmetic, etc. as follows: If you did not complete A8, you will need to start with those instructions, and then, change your code based on the instructions here The main() function should: Create a fixed or dynamic array, e.g., double grade[SIZE] or double *grade = malloc(...) or calloc(...) Concerning the function call for getData(), pass the address of the array and its...
C Programming write two functions, similar to what you see in the sample program. The first will ask the user to enter some information (I have included the type in parentheses) First Name (char[]) Last Name (char[]) Age (int) Height in Inches (double) Weight in Pounds (double) You will use pass-by-reference to modify the values of the arguments passed in from the main(). Remember that arrays require no special notation, as they are passed by reference automatically, but the other...
Create a console application that perform the following: 1. a) Display the size of the following primitive data type: char, short, int long, float, double b) Display the size of a pointer. 2. Display the following memory address for your program: Beginning data segment Start and End of the program segment. (hint: One of the functions must be an empty function place at the end of the program file, that will be the address of the end of the program...
in c++ please Assignment Instructions: MAIN FUNCTION: Ask the user how many students were surveyed. Call a function called makeArray to define an array of integers with the number of elements equal to the number of students surveyed. Call a function called getStudentData to allow the user to enter the number of hours each student spent watching Netflix into the array. Call a function called getAverage to calculate and display the average of the hours entered. Call a function called...
C++ no std: cout but cout<<" ". also nothing ".h": in the header files: Also if statements should be used for the file portion. (filein.eof is not aloud) generate integer random numbers and place them in a file. Each number on a single line. The numbers should range between 1-200 and the program should generate between 100-150 numbers. This means each time the program is executed, a file is created containing between 100-150 numbers with values between 1-200. Make sure...