title: Finding all possible addition and combination given a fixed number in c ( given a sum, find the possible addition and permutation of it.)
body: <p>I'm looking for all the possible combination of number and the permutation of them in a fixed size of array. For example, I have the total number of 5 the desired output will be</p>
  
  <p>5 0 0 0</p>
  
  <p>0 5 0 0</p>
  
  <p>0 0 5 0</p>
  
  <p>0 0 0 5</p>
  
  <p>4 1 0 0</p>
  
  <p>1 4 0 0</p>
  
  <p>1 0 4 0</p>
  
  <p>1 0 0 4</p>
  
  <p>0 1 4 0 </p>
  
  <p>and so on... is this possible ?</p>