Question
Modify the above C program set_operations.c so that it includes the following functions: void set_difference(int *a, int *b, int n, int*difference); void set_complement(int *a, int
Modify the above C program set_operations.c so that it includes the following functions:
void set_difference(int *a, int *b, int n, int*difference);
void set_complement(int *a, int n, int *complement);
set_difference function: it should find the difference of the set represented by array a and set represented by array b and store the result in the set represented by array difference.
set_complement function: it should find the complement of the set represented by array a store the result in the set represented by array complement.
Both functions should use pointer arithmetic not sub-scripting to visit array elements. In other words, eliminate the loop index variables and all use of the [] operator in the function.
The program should be named set_operations2.c. It calls set_difference and set_complement functions in the main function. The main function should also display the result.
6 #includeStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started