Knowee
Questions
Features
Study Tools

In C/C++, which of the following data type is used to store real numbers?

Question

In C/C++, which of the following data type is used to store real numbers?

🧐 Not the exact question you are looking for?Go ask a question

Solution

In C/C++, real numbers can be stored using the float and double data types.

  1. float: This data type is used to store single precision floating point numbers or real numbers. It typically requires 32 bits of storage.

  2. double: This data type is used to store double precision floating point numbers or real numbers. It typically requires 64 bits of storage and provides more precision than float.

So, if you want to store real numbers in your program, you can use either float or double depending on the level of precision you need.

This problem has been solved

Similar Questions

Which of the following is not a basic data type in C language?a.floatb.intc.chard.realClear my choice

Which data type is used for precise decimal calculations in C

What are the basic data types supported in C?

answerThe long data type in C is often used for:OptionsSmall integersSingle-precision floating-point valuesLarge integersDouble-precision floating-point values

Explain different datatypes in C

1/3

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.