text: arr [ ] -- -> Input Array n -- -> Size of input array r -- -> Size of a combination to be printed index -- -> Current index in data [ ] data [ ] -- -> Temporary array to store current combination i -- -> index of current element in arr [ ]
code: void combinationUtil ( int arr [ ] , int n , int r , int index , int data [ ] , int i ) {