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.

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...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.