C# Programming - Datatypes - Discussion
Discussion Forum : Datatypes - General Questions (Q.No. 6)
6.
Which of the following does not store a sign?
Discussion:
8 comments Page 1 of 1.
Adesh Kembari said:
8 years ago
@All. This will be helpful to all.
1) sbyte -128 to 127 Signed 8-bit integer
2) byte 0 to 255 Unsigned 8-bit.integer.
3)char U+0000 to U+ffff Unicode 16-bit character.
4) short -32,768 to 32,767 Signed 16-bit integer.
5) ushort 0 to 65,535 Unsigned 16-bit integer.
6) int -2,147,483,648 to 2,147,483,647 Signed 32-bit integer.
7) uint 0 to 4,294,967,295 Unsigned 32-bit integer.
8) long -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 Signed 64-bit integer.
9) ulong 0 to 18,446,744,073,709,551,615 Unsigned 64-bit integer.
1) sbyte -128 to 127 Signed 8-bit integer
2) byte 0 to 255 Unsigned 8-bit.integer.
3)char U+0000 to U+ffff Unicode 16-bit character.
4) short -32,768 to 32,767 Signed 16-bit integer.
5) ushort 0 to 65,535 Unsigned 16-bit integer.
6) int -2,147,483,648 to 2,147,483,647 Signed 32-bit integer.
7) uint 0 to 4,294,967,295 Unsigned 32-bit integer.
8) long -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 Signed 64-bit integer.
9) ulong 0 to 18,446,744,073,709,551,615 Unsigned 64-bit integer.
(2)
Virendrasingh said:
1 decade ago
Byte variables are stored as unsigned 8-bit (1-byte) numbers ranging in value from 0 through 255.
The Byte data type is used for containing binary data.
The Byte data type is used for containing binary data.
Virendrasingh said:
1 decade ago
You are right @Sonal I am confused too, but just see the link hopefully you got the answer.
http://msdn.microsoft.com/en-us/library/system.byte.aspx
http://msdn.microsoft.com/en-us/library/system.byte.aspx
Sonal said:
1 decade ago
How this answer can be correct when their is signed and unsigned category?
signed byte = -128 to 127.
unsigned byte = 0 to 255.
signed byte = -128 to 127.
unsigned byte = 0 to 255.
Parvezkhan said:
1 decade ago
No. Its rights. Its talking about only Byte instead of Sbyte (Sbyte store the sign value while byte store only unsigned value.
Karthishanth said:
10 years ago
Byte, ulong, ushort, uint these all datatypes are unsigned datatypes.
Mayur said:
1 decade ago
A byte in C# is an unsigned 8-bit integer.
Mani.selva2010@gmail.com said:
1 decade ago
Byte integer is not a valid datatype.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers