Code:
#include <stdio.h>
#include <stdlib.h>
// function declarations
int rawr1(int s, int arr[]);
int rawr2(int s, int arr[]);
int rawr3(int s, int arr[]);
int main(void) {
int x;
int size = 7;
int ar[] = { 2, -5, 13, 6, 4, 2, 2 };
int ar2[] = { 2, -5, 6, 13, 4, 2, 4 };
int ar3[] = { 2, 3, -5, 6, 4, 4, 13 };
int ar4[] = { 2, 2, 4, 4, 2, 13, 7 };
// Call a function at the end of this function.
x = rawr1(size, ar);
printf("rawr1 returned %d\n", x);
// Call functions in a different file.
x = rawr2(size, ar);
printf("rawr2 returned %d\n", x);
x = rawr3(size, ar);
printf("rawr3 returned %d\n", x);
x = rawr3(size, ar2);
printf("rawr3 returned %d\n", x);
x = rawr3(size, ar3);
printf("rawr3 returned %d\n", x);
x = rawr3(size, ar4);
printf("rawr3 returned %d\n", x);
exit (EXIT_SUCCESS);
}
int rawr1(int s, int arr[]) {
// and I have no idea what to do here... so.... please help, please have compassion for the weak newb here.
}
int rawr2(int size, arr[]){
// and I have no idea what to do here as well
}
int rawr3(int size, arr[]){
// and finally no freakin idea what to do here...
}