Thread: view memory location of variable

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,666
    Can't you just write &Number in the address bar of the memory display?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  2. #2
    Registered User
    Join Date
    Jul 2022
    Posts
    17
    Quote Originally Posted by Salem View Post
    Can't you just write &Number in the address bar of the memory display?
    I get two different memory location of variable

    print statement display memory location 1383070532 of Number on terminal

    address bar display of memory 0x000000633418F744 of Number

    confused because there should be only one memory location Number

    Attachment 16497

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. variable memory location with ampersand vs pmap
    By setevoy in forum C Programming
    Replies: 1
    Last Post: 10-23-2014, 01:37 PM
  2. Memory location of variable
    By justine in forum C Programming
    Replies: 9
    Last Post: 11-27-2012, 05:01 PM
  3. allocate apecified memory location for a c variable
    By BharathKumar in forum Linux Programming
    Replies: 5
    Last Post: 06-01-2007, 03:47 PM
  4. Memory Location
    By SomC in forum C Programming
    Replies: 6
    Last Post: 05-08-2004, 02:54 AM
  5. memory location
    By xlordt in forum C Programming
    Replies: 3
    Last Post: 10-21-2002, 09:39 AM

Tags for this Thread