- Engineering
- Computer Science
- please write a c code to do the following in...
Question: please write a c code to do the following in...
Question details
Please write a C code to do the following in Part 1, using the Shell Code provided:
-------------------------------------------------------------------------------------------------------------------------
Here is the Shell Code Provided :
/* ECE 2035 Homework 1-2
Your Name:
Date:
This is the only file that should be modified for the C
implementation
of Homework 1.
This program computes and prints the union of two sets of
ten integers, SetA and SetB. It also prints the size of the
union.
*/
#include
#include
//DO NOT change the following declaration (you may change the
initial value).
int SetA[] = {5, -19, 8, 26, 3, 6, -9, 17, 60, -63};
int SetB[] = {8, 11, -63, 18, 26, 17, 25, 12, -9, 60};
/*
For the grading scripts to run correctly, the above
declarations
must be the first lines of code in this file (for this
homework
assignment only). Under penalty of grade point loss, do not
change
these lines, except to replace the initial values while you are
testing
your code.
Also, do not include any additional libraries.
*/
int main() {
int Size;
// insert your code here
// print the i_th element of the union set using a print statement
with this format:
// printf("%d: %d ", i, element);
printf("Union Set Size: %d ", Size);
return 0;
}
-------------------------------------------------------------------------------------------------------------------------
If you can send me the file itself, email pls.
Solution by an expert tutor
