Home   |   About   |   Terms   |   Contact    
Read & Learn
 

How to find the addresse or the location for ordinary variable in C++?

C++

☯ All C++ Articles     ☯ All Articles


A new product.




Popular Google Pages:



◕ This article is regarding
What is Address Operator in C++?
How to find the addresse or the location for ordinary variable in C++?

Last updated on: .



◕ How to find the addresse or the location for ordinary variable in C++? What is Address Operator in C++?

To find the address or the location of a variable in a memory we use Address Operator.
The Address Operator is represent by '&' sign.
We use this Address Operator to a variable to get the address or the location of that variable in the memory.

◕ Example:
int birds = 2;
cout << birds << endl; // The output will show us the value of the birds, which is 2.
cout << &birds << endl; // The output will show us the location of the variable birds like: 0x004301c8.

◕ Please note:
Generally this address comes in hexadecimal notation. But the address will be different in different computer.



Related articles:
Different between the Object Oriented Programing (OOP) & Traditional Procedural Program?
What is Structure Data Type in C++?
What is the Compound Type in C++?
Array in C++?
Can we read include files in C++?
What is bool Type in C++?
What is char16_t and char32_t in C++?
What is wchar_t in C++?
What is Universal Character Names in C++? How to use Universal Character Names?
What is Escape Sequence in C++? Complete list of Escape Sequence.
Different way to create a new line in C++?




Popular Google Pages:



Top of the page

Amazon & Flipkart Special Products

   


Top of the page