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?

In a float and sink experiment, the density of the liquid is considered a dependent variable. When the density is low, the solid may sink more easily.


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

Pirate


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;


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.


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.


Can a double value be assigned to float variable?

THIS IS FOR JAVA i don't know about anything about other languages yes it can be assignedthe syntax is:int (number) = (float) numberFOR EXAMPLE:int = a;a = (float ) 5.5;if the (float) is not there then in Java it gives an error saying precision loss of data type