text: Driver program to test above
code: public static void Main ( ) { int [ ] arr = { 0 , 2 , 2 , 2 , 0 , 6 , 6 , 0 , 0 , 8 } ; int n = arr . Length ; Console . Write ( " Original ▁ array : ▁ " ) ; printArray ( arr , n ) ; modifyAndRearrangeArr ( arr , n ) ; Console . Write ( " Modified ▁ array : ▁ " ) ; printArray ( arr , n ) ; } }