Using Pointers to implement a filter
I think your problem is simple.

If your function accepts a pointer, you should use the &amp; operator on the variable you pass to the function. In your case, the lines that say:

valueToPrinta = integrate_filter_data_16bit(a, a_buffer, 2);
valueToPrintb = integrate_filter_data_16bit(b, b_buffer, 2);


... should instead say...

valueToPrinta = integrate_filter_data_16bit(a, &amp;a_buffer, 2);
valueToPrintb = integrate_filter_data_16bit(b, &amp;b_buffer, 2);


Or alternatively you could change your variable declrations from:

int a,b,a_buffer,b_buffer,valueToPrinta,valueToPrintb;


... to:

int a,b,valueToPrinta,valueToPrintb;
int a_buffer[1],b_buffer[1];


... because then a_buffer and b_buffer, as symbols, are implicitly pointer variables equivalent to &amp;(a_buffer[0]) and &amp;(b_buffer[0]) respectively.

That being said, your printf's make no sense. If you put &amp; before an expression, you get the address of the memory location allocated to the evaluation of that expression. If you don't put an &amp; before an expression, you get the value stored at the memory location allocated to that expression. That's all there is to it.