Re: Data Transfer Question
1. 1 byte of memory is automagically allocated. It can hold one character ( integers -127 through 127 ) and is referenced by the label c
Originally Posted by maiios
2. A pointer to a FILE structure is created, and given the name 'fp'
3. Several things happen:
First, output.txt is open()'d. If doesn't exist, it is created. If it already exists, then it is next truncated.
Then, fp is set to point to that memory
4. c now contains the integer 0x61 ( decimal 97, which is the ASCII code for the letter 'a' )
5. c, which contains the integer 0x61 ( decimal 97, ASCII a ), is copied to the file stream ( output.txt ) pointed to by the FILE pointer fp
6. The FILE descriptor fp is closed