Re: program bug




"Robert Gamble" <rgamble99@xxxxxxxxx> wrote in message
news:2d73e006-fc0d-4ed7-ae1e-43535dea6140@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
a is not initialized, referencing its value invokes undefined
behavior.

a=fgetc(ifp);
fputc(a,ofp);

In the beginning a was declared. Is it not enough in this case to simply
declare an int? Or should I have done this int a=0; at the beginning of the
program?

Bill


.