answersLogoWhite

0


Best Answer

Then data will be lost. Quite often, at least in Java, the compiler will protest at compile time, basically forcing you to rethink your strategy.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What will happen if you will assign a value to float variable which is beyond the range of float data type?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

When you assign the value 5.628 into a float variable how can you avoid getting the decimal truncation warning?

When assigning a literal value, such as 5.628, to a float variable, you can avoid the decimal truncation warning by either using the float form of the constant (float var = 5.628f), typecasting the assignment (float var = (float) 5.628), or by making the variable double (double var = 5.628).


Assign the value of pie ie 3.142 to a variable with requisite data type?

float pi = 3.142; // Note: pi is an irrational number, there is no "exact" value of pi


Can there be a negative float?

A float variable can store both positive and negative numbers.


'How many bytes is a float variable'?

4


Dependent variable on a float or sink experiment?

The dependent variable in a float or sink experiment is whether the object being tested floats or sinks in water. This variable is influenced by factors such as the object's density and volume, which determine its buoyancy in the water.


What is the is the independent variable in the soda sink or float experiement?

Pirate


How to declare a float variable in java?

it is the same as an int, String, or any of the others:float myVar = 5.7f;If you try to assign a decimal number you must place an "f" at the end, otherwise Java will assume you are trying to assign a double.


How do you declare a pointer variable in c?

int* pint; // instantiate a pointer to an int. float* pflt; // instantiate a pointer to a float.


How do you declare a variable with initial value of 20.1234?

float myVariable = 20.1234;


Independent variable on float or sink experement?

The independent variable in a float or sink experiment would typically be the object's density or mass, which can be manipulated and varied by the researcher. By changing the density or mass of the object being tested, you can observe how it influences whether the object will float or sink in a liquid.


Why the float is used in cprogram?

It's one of the built-in data-types, a float-type variable can hold a floating-point number.


Controlled variable of the egg flotation?

it is when a egg float on the matter of something making it float.