try changing


fprintf( OUTD , "%s" , SPARAM[ i ] );

to

fprintf( OUTD , "%s" , (char *)(SPARAM+i) );