FIR Filter implementation without padding
As I said in a comment, no padding is necessary. A simple FIR implementation might look like (it is assumed that the filter kernel h[] has already been implemented)

float y[N+M-1];
//set y[] to zero
for(int i=0;i&lt;N;i++){ //N - signal length

 for(int j=0;j&lt;M;j++){ //M - filter kernel length (usually much shorter than N 

   y[i+j] = y[i+j]+x[i]*h[j]; //filtered signal of length M+N-1
   }
}


h[] represents the filter kernel and is usually implemented as a window-sync filter of length M (in your case it's just the original signal). 

For your use case, you'd have

int x[7],h[7],y[13]={0};


       int i,j;

       for(i=0;i&lt;7;i++)
       {
         if(i&lt;4)
         {
            x[i] = i+1;
            h[i] = i+1;
         }
         if(i&gt;=4)
         {
            x[i] = 0;
            h[i] = 0;
         }
       }


       for(int i=0;i&lt;7;i++)
       {
          for(int j=0;j&lt;7;j++)
          {
             y[i+j] = y[i+j]+x[i]*h[j]; //filtered signal of length M+N-1
          }
       }


Note that since you're convolving a signal with itself (x*h), you don't even need h[] but I kept it for clarity.