Subject Computer Science C-Family Programming


C programming language:

Create an integer array of size 10.

Create functions for the following tasks and make sure to pass a pointer to the table (array) as an argument to each of them.

a. Populate the array with random numbers between 1 & 100 using pointers.

b. Modify three locations (of your choice) of the array with unique values using dereferencing.

c. Sort the array in the descending order using pointers.

d. Set the pointer to the central (middle) element of the array and multiply each element of the array by 10 using pointers.

Solution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

#include <stdlib.h>
#include <stdio.h>
#include <math.h>

int main(){
int array[10];


void populate_array(int *array)
int i;
for(i = 0; i < 10; i++)
array[i] = rand()%100 + 1;...

This is only a preview of the solution. Please use the purchase button to see the entire solution

Related Homework Solutions

Get help from a qualified tutor
Live Chats