From: Martin DOT Stromberg AT lu DOT erisoft DOT se (Martin Stromberg) Newsgroups: comp.os.msdos.djgpp Subject: Re: More about z80 to 386 Date: 11 Jun 1998 14:45:37 GMT Organization: Ericsson Erisoft AB, Sweden Lines: 20 Message-ID: <6loqih$b62$1@antares.lu.erisoft.se> References: <357EA8E1 DOT 2496 AT rocketmail DOT com> NNTP-Posting-Host: mars.lu.erisoft.se To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Xavi Cardona (xavicardona AT rocketmail DOT com) wrote: : #include : main() : { : int i=5; : char string[6]; /* more memory than we need */ : printf ("&i=%p\n",&i); : } : I run this program and it prints "i=0xbffff804" for example. : Now, I want to put this value in the first bytes of "string", that is, : string[0]=bf, string[1]=ff, and so on, : but I don't know how to do it. Can you help me, please? Try the function htonl. Right, MartinS