Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I have to make a makefile from my lab8.c which is given below. I to make into 6 different files in the attachment . Im

I have to make a makefile from my lab8.c which is given below. I to make into 6 different files in the attachment . Im just confused on how to do this. Need help.

image text in transcribed

/* Wesley Grant Lab:01 3/17/2017 Lab 8 user choose 4 different ways of initializing each array. After each initialization,the array should be printed to the user to show it was initialized correctly by calling a printArray funtion. */

#include void numbers(int array[20]) { int i; for(i=0;i

scanf("%d",&option); switch(option) { case 1: if(n==0) numbers(array1); else numbers(array2); break; case 2: if(n==0) evenNumbers(array1); else evenNumbers(array2); break; case 3: if(n==0) oddNumbers(array1); else oddNumbers(array2); break; case 4: if(n==0) fibbonacci(array1); else fibbonacci(array2); break; } n++; if(n==2) break; }while(n Lab Assignment Copy your lab8.c file over to your lab10 directory. If you did not complete lab8.c, then you'll need to complete that file before working on this lab. Along with your main function, your lab8.c program should consist ofthe following functions void initialize (int a void all (int a J); void even (int a void odd (int a j); void fib (int a j); void printArray int a j); int inner Product int a C j, int b J); For this lab, you will end up with the following 6 files 1. lab10. c main will be implemented here the arrays will still be declared here the initialization and print functions are called from here the inner Product function will be called from here, and the result of the inner Product function will be returned back here to the main function which will print the result to the user 2. initialize .c the following functions and their implementations will reside in this module void initialize (int a void all (int a C j); void even (int a j); void odd (int at j); void fib (int at j); 3. print.c the printArray function will be in this module 4. inner Product.c the inner Product function will be in this module 5. lab10. h all the needed Clibrary #include statements will be in this header file, as well as the #define for the SIZE of the arrays (if you didn't use #define for SIZE, then you should change your code to use this preprocessor constant), and also all the function prototypes. 6. makefile provided for you on Canvas (download this file to your lab10 directory) Lab Assignment Copy your lab8.c file over to your lab10 directory. If you did not complete lab8.c, then you'll need to complete that file before working on this lab. Along with your main function, your lab8.c program should consist ofthe following functions void initialize (int a void all (int a J); void even (int a void odd (int a j); void fib (int a j); void printArray int a j); int inner Product int a C j, int b J); For this lab, you will end up with the following 6 files 1. lab10. c main will be implemented here the arrays will still be declared here the initialization and print functions are called from here the inner Product function will be called from here, and the result of the inner Product function will be returned back here to the main function which will print the result to the user 2. initialize .c the following functions and their implementations will reside in this module void initialize (int a void all (int a C j); void even (int a j); void odd (int at j); void fib (int at j); 3. print.c the printArray function will be in this module 4. inner Product.c the inner Product function will be in this module 5. lab10. h all the needed Clibrary #include statements will be in this header file, as well as the #define for the SIZE of the arrays (if you didn't use #define for SIZE, then you should change your code to use this preprocessor constant), and also all the function prototypes. 6. makefile provided for you on Canvas (download this file to your lab10 directory)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Databases And Information Systems Uropean Conference Adbis 2020 Lyon France August 25 27 2020 Proceedings Lncs 12245

Authors: Jerome Darmont ,Boris Novikov ,Robert Wrembel

1st Edition

3030548317, 978-3030548315

More Books

Students also viewed these Databases questions

Question

3. Evaluate a Web-based training site.

Answered: 1 week ago