Reputation: 11
I think I might be digging into this too deep but I am curious if there really is any difference between using fprintf with a variable or not? Other than the memory usage of x in this case.
fprintf(stderr,"%d", 1);
vs
int x = 1;
fprintf(stderr,"%d", x);
Upvotes: 1
Views: 241
Reputation: 224457
There's no difference. Both x
and 1
are of type int
, so there is no difference between the two as far as printf
is concerned.
Upvotes: 3