Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!cs.utexas.edu!samsung!think!ames!attctc!bobc From: bobc@attctc.Dallas.TX.US (Bob Calbridge) Newsgroups: comp.lang.c Subject: how to write () a constant? Keywords: how to, write(), constant Message-ID: <10883@attctc.Dallas.TX.US> Date: 8 Jan 90 00:43:38 GMT Distribution: na Organization: The Unix(R) Connection, Dallas, Texas Lines: 15 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@attctc Your humble servant (real humble) - =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=