Number of possible Functions

Statement:
'A' = {1, 2, 3, 4, ............, n},
'B' = {1, 2, 3, 4, ............, m} 
Explanation:
Examples:
  1. If set ‘A’ contain ‘3’ element and set ‘B’ contain ‘2’ elements then total number of function possible will be .
  2. If set ‘A’ contain ‘5’ element and set ‘B’ contain ‘2’ elements then total number of function possible will be .
  1. If set ‘A’ contain ‘3’ element and set ‘B’ contain ‘2’ elements then the total number of functions possible will be .
  2. If set ‘A’ contain ‘5’ element and set ‘B’ contain ‘2’ elements then the total number of function possible will be .
'A' = {1, 2, 3, 4, ............, n},   
'B' = {1, 2, 3, 4, ............, m} 
'C' = {1, 2, 3, 4, ............, p}