944,191 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 1133
  • C++ RSS
May 9th, 2007
0

c doubts

Expand Post »
Hi to one and all,

this is satya,

I few doubts in c those are, All are linux based,

1) How we can convert physical address to virtual adress and vice-versa,for this any linux system call.

2)How a float will store in binary format.

3)what the use of constant volataile.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
satyanarayanam is offline Offline
4 posts
since May 2007
May 9th, 2007
0

Re: c doubts

1) How we can convert physical address to virtual adress and vice-versa,for this any linux system call.
Not related to C++. It depends on the OS and it's memory mgmt algorithms. Check up http://en.wikipedia.org/wiki/Linux#References, I think you'll find some link that explains how Linux does it.

2)How a float will store in binary format.
No too sure but, one really don't need to bother abt it if you're using standard APIs for reading and writing a float to/from a binary stream.
My guess: Same as it would be represented in logical memory (which would be different for different hardware and types (double, float...).

3)what the use of constant volataile.
It tells compiler that don't optimize (by caching it's value) use of this variable all the time as it's value could change at anytime during the execution of the program WITHOUT it's knowledge. So basically wherever it generates code for accessing such a variable it'll make sure that it gets the value from variable's actual memory location.
Always check wikipedia most probably you'll find it there...
Reputation Points: 254
Solved Threads: 74
Practically a Posting Shark
thekashyap is offline Offline
804 posts
since Feb 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: Laser game --Need help to finish
Next Thread in C++ Forum Timeline: help in reading a file..





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC