[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

problem with fprintf()



Hi.

When I compile a simple program like below -

#include <stdio.h>

int main()
{
  FILE *f = fopen("test","w");
	fputc(0, f);
	fprintf(f,"%c", 0);
	return 0;
}

fputc() writes the character 0 correctly, but not fprintf().
In fact, fprintf() doesnt write anything! This happens only
with character 0 - I checked few others and they were ok.
What could be the reason?

Such a problem usually takes a long time to debug, better to
mention it somewhere :-)

I am using ETRAX 100 board with devboard-R1_0_2 software release.

Best wishes,
-- prabhat

--
Prabhat Avasare    IMEC (DESICS)          email: avasare@xxxxxxx.be
                   Kapeldreef 75            Tel: +32-16-288123
                   B3001 Leuven             Fax: +32-16-281515
                   Belgium.