c doubts

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: May 2007
Posts: 4
Reputation: satyanarayanam is an unknown quantity at this point 
Solved Threads: 0
satyanarayanam satyanarayanam is offline Offline
Newbie Poster

c doubts

 
0
  #1
May 9th, 2007
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.
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 539
Reputation: thekashyap will become famous soon enough thekashyap will become famous soon enough 
Solved Threads: 50
thekashyap's Avatar
thekashyap thekashyap is offline Offline
Posting Pro

Re: c doubts

 
0
  #2
May 9th, 2007
Originally Posted by satyanarayanam View Post
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.

Originally Posted by satyanarayanam View Post
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...).

Originally Posted by satyanarayanam View Post
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...
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC