简体   繁体   中英

How i can read memory address fetched using pointer?

I want to know what is this (0x6dfe80) memory address? and how it can be useful in coding. And if i fetched a memory address and how i can read it and estimate where is this memory location.

  • what is meant by 0x?
  • what is meant by 6d?
  • what is meant by fe?
  • what is meant by 80?

or how this memory location is arranged?

#include <iostream>

using namespace std;

int main(){

    int a,b,c;
    int* pointer_a; int* pointer_b; int* pointer_c;


    pointer_a = &a;
    pointer_b = &b;
    pointer_c = &c;

    cout<<"Address of variable a : "<<pointer_a<<endl;
    cout<<"Address of variable b : "<<pointer_b<<endl;
    cout<<"Address of variable c : "<<pointer_c<<endl;

    return (0);
}

代码

what is meant by 0x?

0x is a prefix that signifies a number in hexadecimal (which means 16) base (also called radix). Addresses are conventionally serialised in hexadecimal.

what is meant by 6d? what is meant by fe? what is meant by 80?

These are hexadecimal digits. It is a number.

and how it can be useful in coding.

Indirection has many uses. For example, it can be used to implement a tree data structure.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM