CodePudding user response:
You can see the characters, is encoded, really put a 1 in to you don't understandCodePudding user response:
Int 32 maximum 10, you wrote in TXT is 10 bytes ohSaid differently, memory is to use a fixed size of memory to an int, is not a text file, how much is how much of a
And memory corresponding files are binary file, binary file inside an int is 4 bytes
CodePudding user response:
What you see in TXT is characters, not bytes, you will write files in binary way is bytes, so the TXT see 4 is a character, accounting for 1 byte (c 1 char is 1 byte), 21 is two characters, so it is two bytes,CodePudding user response:
If you save a int I=567, you will find that is 3 bytes,This is because you are save text way,
In text format, the system will use each number as a character (bytes)
Saved up 5 and 7 of the text of the three characters,
CodePudding user response:
We are talking of 4 bytes is refers to the memory, rather than a file.