Driver Code
int main ( ) { int a1 [ ] = { 2 , 3 , 4 } ; int a2 [ ] = { 1 , 6 , 5 , 8 } ; int size1 = sizeof ( a1 ) / sizeof ( a1 [ 0 ] ) ; int size2 = sizeof ( a2 ) / sizeof ( a2 [ 0 ] ) ; int k = 4 ; printKPairs ( a1 , a2 , size1 , size2 , k ) ; return 0 ; }