What are the three floating-point data types in C#? Briefly describe the characteristics of each type.

What will be an ideal response?


A floating-point number is one that contains decimal positions. C# supports three floating-point data types: float, double, and decimal. A float data type can hold as many as seven significant digits of accuracy. A double data type can hold 15 or 16 significant digits of accuracy. Compared to floats and doubles, the decimal type has a greater precision and a smaller range, which makes it suitable for financial and monetary calculations. For example, a decimal given the value 123456789.987654321 will appear as 123456789.987654321 (notice that it is accurate to the rightmost digit). A decimal cannot hold as large a value as a double can, but it can be accurate to more decimal places.

Computer Science & Information Technology

You might also like to view...

Answer the following statements true (T) or false (F)

a) You must create JavaFX GUIs by hand coding them in Java. b) The layout VBox arranges components vertically in a scene. c) To right align controls in a GridPane column, set its Alignment property to RIGHT. d) The FXMLLoader initializes the controller’s @FXML instance variables. e) You override class Application’s launch method to display a JavaFX app’s stage.

Computer Science & Information Technology

Attempting to assign the address of an array name is invalid.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

Case PPT 7-1Amber is an assistant in the human resources department of a large company. She often works with documents and presentations that contain sensitive employee information. She is currently working on a presentation that is part of a package used to recruit top-level executives. Amber has included several video and audio files in her presentation. She's a little worried about the file size. Which command should she use?

A. Create Handouts B. Create a Video C. Encrypt  with Password D. Compress Media

Computer Science & Information Technology

An architectural decision is often documented using an architecture decision description template. 

Answer the following statement true (T) or false (F)

Computer Science & Information Technology