| Characters: files | ||||||||||||||
| What happens when you type "123" in a text editor and save it to a file? | ||||||||||||||
| Characters '1', '2', '3' are stored in the file, not binary integer 123. | ||||||||||||||
| What if you type a series of 0's and 1's? | ||||||||||||||
| Still just characters | ||||||||||||||
| How can you write binary representation of data to a file? | ||||||||||||||
| hex editors allow you to type hexadecimal values like F3, 2A, etc. and store them as bytes | ||||||||||||||
| In C, use "b" in mode string with fopen to open the file | ||||||||||||||
| "rb": open for reading | ||||||||||||||
| "wb": open for writing | ||||||||||||||
| etc. | ||||||||||||||