FFT widow to dsp processor. I am applying 8 samples and triangular window to my fft engine. I am getting the results but not accurate (approximately equal with some tolerance).

I am calculating MATLAB reference as below :

a=[1,2,3,4,5,6,7,8];
b=triang(8);
c=a*b;
d=fft(c) 


Is it the correct way to apply window for signal processing unit?
No. You are doing a matrix mutliply and not a vector multiply. Correct version would be 

a=[1,2,3,4,5,6,7,8]'; % column vector
b=triang(8); % also column vector
c=a.*b;    % vector multiply
d=fft(c)