Write a complete C program that asks the user to input two sets of integer numbers each of size 5 and store them in two arrays A and B. The program then outputs the elements that are common to both sets (available in both A and B). If there are no common elements, the program should output the message "No common elements ".

An example of the program RUN:
Enter the values of A[0] and B[0] >2 4
Enter the values of A[1] and B[1] >1 6
Enter the values of A[2] and B[2] >5 2
Enter the values of A[3] and B[3] >7 5
Enter the values of A[4] and B[4] >6 3
The result is:
2
5
6

We don't do homework. Show us your code and ask us to help you with something you don't understand.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.