Question
Write a c program that finds the uncommon elements from two array elements using pointers onl y . For example : Enter the length of
Write a c program that finds the uncommon elements from two array elements using pointers only .
For example : Enter the length of the array one : 5
Enter the elements of the array one: 9 8 5 6 3
Enter the length of the array two: 4
Enter the elements of the array two: 6 9 2 1
output: 8 5 3 2 1
void uncommon_ele(int *a, int n1, int *b, int n2, int *c, int*size);
The function should use pointer arithmetic not subscriptingto visit array elements. In
other words, eliminate the loop index variables and all use of the [] operator in the function.
The uncommon_ele function finds the elements that in either array a or array b, but not both, and stores the result in array c. The function takes an int array parameters a1 and 2 as the first parameter and third parameters and the number of elements of the arrays as the second parameter.
The sixth parameter size points to a variable in whi ch the function will store thenumber of
actual elements in array c.
Step 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