Levels Tought:
Elementary,Middle School,High School,College,University,PHD
Teaching Since: | Apr 2017 |
Last Sign in: | 10 Weeks Ago, 5 Days Ago |
Questions Answered: | 4870 |
Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
Hello my friend can you help me with this c program
Â
Project 3, Program Design1.Write three functions for the attached programsets_of_numbers.c. The sets are represented as arrays ofintegers. Assume the sets has no more than 50 elements. The zeroth element of each array has a specialmeaning: it indicates the number of elements in the set. The set elements themselves will be located inarray elements index: 1 through N. Read the program and add the following functionalities:1)Write a function that deletes a specific element from a set.void delete_set(int v, int a[]);Add function declaration ofdelete_setafter the other function declarations. Uncomment thestatements in main function that callsdelete_set.2)Write a function that calculated the set difference of set a and b, store the result in set c. The setdifference is the set of all elements that are in set a, but not in b.void set_difference(int a[], int b[], int c[]);Add function declaration ofset_differenceafter the other function declarations. Uncommentthe statements in main function that callsset_difference.3)Write a function that calculates the symmetric difference between two sets. Symmetric differencebetween two sets a and b is defined as the set of all elements in either a or b, but not both. Hint:you’ll findset_differenceandunion_setuseful.void sym_difference(int a[], int b[], int c[]);Add function declaration ofsym_differenceafter the other function declarations. Uncommentthe statements in main function that callssym_difference.2.Assume the + operator is not available. Write a program that takes two numbers as input and display theaddition of them. The program should include a functionadd (int n, int m)that will add twonumbersusing only recursionand the increment and decrement operators. Either of the two numberscan be zero, positive, or negative.Hint:add(n, m)= add(++n, --m), if m is positive, andadd(n, 0)=n.