Driver program to test above function
int main ( ) { char keypad [ 4 ] [ 3 ] = { { '1' , '2' , '3' } , { '4' , '5' , '6' } , { '7' , '8' , '9' } , { ' * ' , '0' , ' # ' } } ; cout << " Count ▁ for ▁ numbers ▁ of ▁ length ▁ 1 : ▁ " << getCount ( keypad , 1 ) << endl ; cout << " Count ▁ for ▁ numbers ▁ of ▁ length ▁ 2 : ▁ " << getCount ( keypad , 2 ) << endl ; cout << " Count ▁ for ▁ numbers ▁ of ▁ length ▁ 3 : ▁ " << getCount ( keypad , 3 ) << endl ; cout << " Count ▁ for ▁ numbers ▁ of ▁ length ▁ 4 : ▁ " << getCount ( keypad , 4 ) << endl ; cout << " Count ▁ for ▁ numbers ▁ of ▁ length ▁ 5 : ▁ " << getCount ( keypad , 5 ) << endl ; return 0 ; }