how to write () a constant?

Bob Calbridge bobc at attctc.Dallas.TX.US
Mon Jan 8 11:43:38 AEST 1990


A quick question if you please,  Suppose you want to write a binary constant
to a file.  Would the following code be valid?

	write(handle, (int *) '0x01', sizeof(int))

If so, is there any advantage to it in terms of program size, speed?
Or would it be better to assign the value to a variable and just point to it?
 
Thanks,
Bob
-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
=    More stupid questions available on request from                          =
-     bobc at attctc                     Your humble servant (real humble)       -
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=



More information about the Comp.lang.c mailing list