answersLogoWhite

0


Best Answer

The float data type is a fundamental numeric data type that can represent floating point values. Depending on the implementation, it is normally 4 bytes in size, with a precision around 6 decimal digits.

A float is a primitive data type in C++, representing a real number. On 32-bit system, a float occupies 4 bytes, representing values in the range 1.2e-38 to 3.4e38. They are often called single in other languages.

A double is also a floating point data type, larger than or equal to a float, but shorter or equal to a long double. On a 32-bit system, a double is 8 bytes long, representing values in the range 2.2e-308 to 1.8e308.

A long double is the longest floating point type and is equal to or greater than a double. On 32-bit systems, a long double is generally 10 byes long, representing values in the range 3.4e-4932 to 1.1e4932.

Note that in Microsoft's implementation of C++, a long double is the same length as a double, but they are still treated as different types.

User Avatar

Wiki User

7y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

14y ago

Float literals are numeric constants in the program that contain a decimal point and also contain a float type override (f or F). They may optionally contain an exponent (e or E), in which case the decimal point is optional. The constants 123.456f and 123.456e17f (or 123456e14f) are examples. Without the f override, the default is double, which will force a conversion in a mixed expression and sometimes a compiler warning about loss of precision.

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

A 'float' variable may contain decimal values other than integer, and may also be expressed as scientific notation. As a result, float variables can express very large or very small values (10^38, 10^-38).

This answer is:
User Avatar

User Avatar

Wiki User

7y ago

The term "float per" has no meaning in C++ (or indeed any programming language). However, A float is a data type representing a single-precision real number. We use the float data type when we require single-precision arithmetic. If we require greater precision we use double or long double data types.

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

datatype

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What does the value 'float' mean in C plus plus?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Why the float takes 4 bytes in turbo c plus plus?

What's your problem with that? It's a (quasi-)standard value for a 'float'.


How do you invoke function result () takes two float argument and returns an integer in c plus plus program?

You can do this by creating a forwarddeclaration of the function. You can call the forward drclared function inside the main to use it.int result(float num1, float num2);intmain(void){int value = result(3.14, 2.74);return (0);}intresult(float num1, float num2){int value = 0;// function codes goes here// you can alter the value of variable 'value'return (value);}The returning value of the 'result()' function is assigned to variable 'value' in 'main()'.


What do you mean by casting a value?

casting a value is when the data type is changed from one type to another.int a = 100;float b:b = (float)a;------The (float)a casts an int to a float. In C this is automatic but in C++ it is not. For the sake of readability and debugging it is a good idea to put the cast in the code, this is relay helpful 6 months later when you review your work.


What is a primitive type variable in c plus plus?

same the types used in C. that is int...char...float...


What is argument in c plus plus?

If this is a homework assignment, please consider trying to answer it yourself first, otherwise the value of the reinforcement of the lesson offered by the assignment will be lost on you.An argument (or parameter) in C or C++ is a special variable that is passed to a function when it is called. In the example...float sin(float x);... the x is an argument. Within the body of the function, x refers to the copy of the caller's argument that was passed to the function.

Related questions

Why the float takes 4 bytes in turbo c plus plus?

What's your problem with that? It's a (quasi-)standard value for a 'float'.


How do you invoke function result () takes two float argument and returns an integer in c plus plus program?

You can do this by creating a forwarddeclaration of the function. You can call the forward drclared function inside the main to use it.int result(float num1, float num2);intmain(void){int value = result(3.14, 2.74);return (0);}intresult(float num1, float num2){int value = 0;// function codes goes here// you can alter the value of variable 'value'return (value);}The returning value of the 'result()' function is assigned to variable 'value' in 'main()'.


What does c mean in y equals mx plus c?

c is any constant value


What is x plus c?

That depends on the value of x, and the value of c. The expression "x + c" can't be simplified, if that's what you mean.


What do you mean by casting a value?

casting a value is when the data type is changed from one type to another.int a = 100;float b:b = (float)a;------The (float)a casts an int to a float. In C this is automatic but in C++ it is not. For the sake of readability and debugging it is a good idea to put the cast in the code, this is relay helpful 6 months later when you review your work.


What is a primitive type variable in c plus plus?

same the types used in C. that is int...char...float...


What is another word for float in c plus plus?

double, but double is nearly twice the precision of float, so its not really the same thing.


What is argument in c plus plus?

If this is a homework assignment, please consider trying to answer it yourself first, otherwise the value of the reinforcement of the lesson offered by the assignment will be lost on you.An argument (or parameter) in C or C++ is a special variable that is passed to a function when it is called. In the example...float sin(float x);... the x is an argument. Within the body of the function, x refers to the copy of the caller's argument that was passed to the function.


Is the double a modifier in c plus plus?

A double is a floating point type, greater than or equal in size to a float.


What value of c makes 4x2 plus 16 plus c a perfect square?

16


What is the value of a b and c in the equation ax2 plus bx plus c?

any number


What does multiplying a pointer by 5 in C plus plus mean How does it change the pointer's value?

Multiplication is yet another thing, what you should never do with pointers.