Driver program to test above function
public static void Main ( ) { int [ ] arr1 = { 1 , 2 , 4 , 5 , 6 } ; int [ ] arr2 = { 2 , 3 , 5 , 7 } ; int m = arr1 . Length ; int n = arr2 . Length ; printUnion ( arr1 , arr2 , m , n ) ; } }