C Programming - Floating Point Issues - Discussion
Discussion Forum : Floating Point Issues - General Questions (Q.No. 8)
8.
A float occupies 4 bytes. If the hexadecimal equivalent of these 4 bytes are A, B, C and D, then when this float is stored in memory in which of the following order do these bytes gets stored?
Discussion:
36 comments Page 1 of 4.
Ridhima Ramteke said:
8 months ago
Thank you for explaining the answer.
Raj said:
8 years ago
Please give an explanation. I am not getting the answer.
Thenu said:
9 years ago
Thank you for all your explanation.
(1)
Usman ali ar said:
10 years ago
What is meaning of this answer?
Ganesh said:
1 decade ago
Thank you all for such wonderful explanation.
SAGAR said:
1 decade ago
Thanks nice explanation.
Avi said:
1 decade ago
Simple answer (stack) :
For example memory location occupied for float (4 byte (32 bit) ) (1000 to 1003) and hex is ABCD (00001010 00001011 00001100 00001110).
MSB A B C D LSB.
Little endian architecture:- Lower byte (LSB) store first so,
1000-D.
1001-C.
1002-B.
1003-A.
Big endian architecture:- Higher byte (MSB) store first so,
1000-A.
1001-B.
1002-C.
1003-D.
For example memory location occupied for float (4 byte (32 bit) ) (1000 to 1003) and hex is ABCD (00001010 00001011 00001100 00001110).
MSB A B C D LSB.
Little endian architecture:- Lower byte (LSB) store first so,
1000-D.
1001-C.
1002-B.
1003-A.
Big endian architecture:- Higher byte (MSB) store first so,
1000-A.
1001-B.
1002-C.
1003-D.
(4)
Sahithi said:
1 decade ago
Yes I need the single answer which is right its a little bit confusing.
(1)
Indhu said:
1 decade ago
I got confused by this different answers.
Please anyone give short and clear information.
Please anyone give short and clear information.
Achal said:
1 decade ago
Hi bro I have doubt to store float value in given memory locations compiler follows IEEE 754 method, not endianness method.
I think endianness is for storing integer variable only.
Any info share with me I'm waiting.
I think endianness is for storing integer variable only.
Any info share with me I'm waiting.
(1)
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers