Question
Write a function in C to find the common elements in two 2-D arrays A and B having dimensions m x n and p x
Write a function in C to find the common elements in two 2-D arrays A and B having dimensions m x n and p x q respectively and store them in a single dimensional array. Here, m is the number of rows and n is the number of columns in the two-dimensional array A. Similarly, p is the number of rows and q is the number of columns in the two-dimensional array B. Assume that there are no duplicate elements within the two-dimensional arrays A and B separately.
For Example: A[ ][3]= {{1, 2, 3), (4, 5, 6} }; // No Duplicate Elements B[ ][3]= ((7, 2), (4, 1}}; // No Duplicate Elements Resultant Array Containing Common Elements = (1,2,4} Note that the size of single dimension array will be minimum of m x n, p x q.
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