C program to print common values of two arrays

C program to print common values of two arrays

Input:

Enter the size of array A:
9
Enter the elements of array A:
1 2 3 4 5 6 7 8 9
Enter the size of array B:
7
Enter the elements of array B:
2 4 6 8 10 12 14

Output:

2 4 6 8

Implementation: