What is the C# equivalent of System.Single

A) Float (16-bit)
B) Float (32-bit)
C) Float(64-bit)

Showing Answers 1 - 2 of 2 Answers

naveentej

  • Jan 7th, 2006
 

Ans: Float 32 bit

e.g. float i = 6.8F; // or 6.8f

By default, a real numeric literal on the right-hand side of the assignment operator is treated as double. Therefore, to initialize a float variable use the suffix f or F.

If you don't use the suffix in the previous declaration, you will get a compilation error because you are attempting to store a double value into a float variable.

  Was this answer useful?  Yes

Ans : B

Single is a 32-bit single precision floating-point type that represents values ranging from approximately 1.5E-45 to 3.4E+38 and from approximately -1.5E-45 to -3.4E+38 with a precision of 7 decimal digits

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions