Professional Documents
Culture Documents
StudentID: 2019502075
Date: 05.03.2022
Task 1
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define SIZE 10
int i;
int main()
double Average;
double *pAverage;
srand(time(NULL));
printf("\n\n");
Calculator(p,pTotal,pAverage); // Calculator() is called to find the total and the average of the
array
return 0;
// displaying results
for(i = 0; i<SIZE;i++)
*pTotal += *(p+i);
Task 2
include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define SIZE 7
int main()
int a[SIZE], *p = a;
fillArray(p,SIZE);
printArray(p, SIZE);
reverseArray(p, SIZE);
printArray(p,SIZE);
return 0;
srand(time(NULL));
for(int i = 0; i<size;i++)
*(ptr + i) = rand()%100;
printf("%d",*(ptr+i));
printf("\n");
int temp;
{
temp = *(ptr +i);