answersLogoWhite

0

No. Not unless the value contained is an integer value, and the number of digits is less than the resolution of the int type. Most doubles support about 15 digits of resolution, while 32 bit integers only support 9. You might be successful in a 64 bit int format, but you still need to consider the maximum value.

The only thing the type cast buys you is elimination of the compiler warning. With the type cast, you are telling the compiler that you know what you are doing.

User Avatar

Wiki User

14y ago

What else can I help you with?

Continue Learning about Engineering

Why nickel is only use for weld the cast iron?

Nickel is used mainly because cast iron is brittle and very suseptable to rapid heat change. The nickel rods allow the weld to heat and contract without causing cracks. you can also help this process be heating the cast iron to cherry red and when welded allow it to cool wrapped in rock wool. this allows for a slow cooling helping to prevent cracking.


Why long data type converted to double by multiplying by 1.0?

If two numbers are involved in a calculation (in this case a multiplication), the result is converted to the more precise data type, to avoid data loss. Even though between long and double data can be lost in either direction, a number with decimals (such as double) is generally considered to be more precise than a number without decimals (such as long). Even though languages such as Java also have a "float" data type, "double" is normally used by default in cases such as these, because of the greater precision. However, you can convert explicitly to float, if you like, using a cast. (Float uses 4 bytes, while double uses 8 bytes.)


What is the thermal conductivity of Cast iron?

Thermal conductivity refers to the measure of the ability of a material to allow the flow of heat from its warmer surface to its colder surface. The thermal conductivity of cast iron is 80 Wm-1K-1.


Why are steels more difficult to cast than a cast iron?

mainly because during the welding process cast iron; being brittle, is prone to cracking. ways to prevents this are to preheat the whole piece to cherry red and when completed allow it to slow cool by wrapping in rock wool.


Size of a variable without using sizeof operator?

Declare 2 pointer variable of the same type and assign the address of the variable to them and then increment one of them. Find the difference between the above 2 pointers using a type cast. This will be the size of the variable. Eg: double i; double * p = &i; double * q= p; p++; cout<<(int)p-(int)q<<endl;

Related Questions

What actors and actresses appeared in The Convert - 2013?

The cast of The Convert - 2013 includes: Nikolai Kiselev


What does a runescape mud staff do?

A mud staff is a hybrid of an earth and water staff. It will allow the players to cast spells without both water and earth runes in their inventory.


What actors and actresses appeared in The Convert - 1995?

The cast of The Convert - 1995 includes: Patrick Ferguson as The Christian


What happens when java program attempts to divide one integer by another?

In that case, unless you specifically convert ("cast") at least one of the numbers to a double or float, the result will also be an integer. Example: 1 / 3 = 0


Why nickel is only use for weld the cast iron?

Nickel is used mainly because cast iron is brittle and very suseptable to rapid heat change. The nickel rods allow the weld to heat and contract without causing cracks. you can also help this process be heating the cast iron to cherry red and when welded allow it to cool wrapped in rock wool. this allows for a slow cooling helping to prevent cracking.


How do we convert between an int to a char?

With an explicit cast, for example (in Java): int i = 0; char c; c = (char) i; Please note that data may be lost in such a conversion; the explicit cast basically tells the compiler "go ahead; I know what I am doing". Without an explicit cast, the compiler won't accept the conversion.


Why long data type converted to double by multiplying by 1.0?

If two numbers are involved in a calculation (in this case a multiplication), the result is converted to the more precise data type, to avoid data loss. Even though between long and double data can be lost in either direction, a number with decimals (such as double) is generally considered to be more precise than a number without decimals (such as long). Even though languages such as Java also have a "float" data type, "double" is normally used by default in cases such as these, because of the greater precision. However, you can convert explicitly to float, if you like, using a cast. (Float uses 4 bytes, while double uses 8 bytes.)


What actors and actresses appeared in Hannibal rough Stuff 13 - 2008?

The cast of Hannibal Ruff Stuff 14 - 2008 includes: Double Stone


What material doesn't cast a shadow?

Transparent materials, such as glass or clear plastic, do not cast a shadow because they allow light to pass through them without obstructing it. However, in certain conditions, they may cause refraction of light that can create patterns resembling shadows.


What actors and actresses appeared in His Convert - 1915?

The cast of His Convert - 1915 includes: Marc McDermott as Gerald Morgan Mabel Trunnelle as Lizzie


What actors and actresses appeared in Her Convert - 1915?

The cast of Her Convert - 1915 includes: Harry Carey as The Converted Cracksman Charles West as The Old Inventor


How can you convert colorless mana into colored mana in Magic: The Gathering?

In Magic: The Gathering, you can convert colorless mana into colored mana by using cards or abilities that specifically allow you to do so. These cards or abilities will typically have instructions on how to convert colorless mana into a specific color of mana, such as red, blue, green, white, or black. By following these instructions, you can effectively change colorless mana into colored mana to cast spells or activate abilities that require colored mana.