answersLogoWhite

0


Best Answer

No. The address of a float can only be assigned to a variable of type pointer to float. Any other (coerced) use is outside of the definition, implementation, and portability of the language.

Yes, with typecast, but it is entirely pointless:

float f;
char c = (char)&f;

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Address of a float can be assigned to a char?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How many bytes required for int float double char boolean?

Int: 4 bytes Float: 4 double: 8 char: 1 boolean: 1


How many bytes does float double long string and char store?

float usually 4 double usually 8 long is 8 but integer, unlike double string is a pointer to a memory address containing array of chars, so it doesn't have a fixed size and a char is usually 1, but i think its 2 in java


What is the types of data?

int, but can be assigned to a short, long or char as well


Can you assigned value of int to a ordinary pointer?

Yes, with type-cast (but I don't see why you should): char *ptr = (char *)300;


What is the data type of 5?

int, but can be assigned to a short, long or char as well


What is the range of integer char float for a 16 bit computer?

Consult your limits.h and math.h. For char it will be -128..127 or 0.255 (signed and unsigned).


What is the range of integer char float for a 16-bit computer?

Consult your limits.h and math.h. For char it will be -128..127 or 0.255 (signed and unsigned).


Mention different types available in C?

Char, int, float and double.


What is the different type of data type in c classified it?

float,int,char


Is address a user-defined data type?

You can define a data-type called 'address': 1. typedef void *address; 2. typedef struct address { char country [32]; char state [32]; ... } address.


How do you check address of char variable?

Use the address-of operator: char c=32; // space character std::cout<<&c<<std::endl;


Can an float value be assigned to int variable?

Yes, an integer can be assigned as a float value.But it get stored as a float value, that is an implicit type conversion occurs during compilation.Smaller data types are convertible to larger data types.eg:float b=12;// an integer constant is assigned to a float variableprintf("%f",b);// when printing b it will print as 12.000000