How many bytes does a value of the C# type long occupy?
Correct answer A. 8
Explanation
long is an alias for System.Int64, a signed 64-bit integer, so it takes 8 bytes and ranges from about -9.2 quintillion to 9.2 quintillion. int is 32-bit (4 bytes), short is 16-bit (2 bytes) and decimal is 128-bit (16 bytes). Unlike C and C++, C# fixes these sizes in the language, so they do not vary between platforms.
Answer checked How we write and check questions
Discussion