Thread: physical address or logical ??

  1. #1
    Registered User
    Join Date
    Oct 2005
    Hyderabad, India

    physical address or logical ??

    #include <iostream.h>
    void main(){
      int a = 1;
      cout<< &a;
    is the address output the actual physical memory address of the variable or some logical address.

  2. #2
    Registered User
    Join Date
    Sep 2004
    Umm, your not giving much information. What OS, Hardware, compiler?

    If its Linux (on x86,x86-64), Windows, or Mac OS X, its most likely a logical address, as the kernel maps the logical addresses to physical ones for those operating systems I think.

    int main, not void main, main returns an int as part of the standard, and I think your book, teacher, tutorial is outdated, and your compiler probably as well, since you are supposed to use iostream, not iostream.h
    If any part of my post is incorrect, please correct me.

    This post is not guarantied to be correct, and is not to be taken as a matter of fact, but of opinion or a guess, unless otherwise noted.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. What does this do (Windows API)?
    By EVOEx in forum Windows Programming
    Replies: 4
    Last Post: 12-19-2008, 10:48 AM
  2. I thought pointers were pointers...
    By keira in forum C Programming
    Replies: 19
    Last Post: 08-15-2007, 11:48 PM
  3. DX - CreateDevice - D3DERR_INVALIDCALL
    By Tonto in forum Game Programming
    Replies: 3
    Last Post: 12-01-2006, 07:17 PM
  4. pointers
    By InvariantLoop in forum C Programming
    Replies: 13
    Last Post: 02-04-2005, 09:32 AM
  5. Im so lost at . .
    By hermit in forum C Programming
    Replies: 18
    Last Post: 05-15-2002, 01:26 AM