February 2014
Beginner
1248 pages
62h 25m
English
File streams can be used to input and output data as bytes or characters.
• Byte-based streams output and input data in its binary format—a char is two bytes, an int is four bytes, a double is eight bytes, etc.
• Character-based streams output and input data as a sequence of characters in which every character is two bytes—the number of bytes for a given value depends on the number of characters in that value. For example, the value 2000000000 requires 20 bytes (10 characters at two bytes per character) but the value 7 requires only two bytes (1 character at two bytes per character).
Files created using byte-based streams are referred to as binary files, while files created using character-based streams ...
Read now
Unlock full access