DEV Community

Muhammad28m
Muhammad28m

Posted on

New post

Hello everyone, today we have covered the topic "Pointer" in c++ programming language.
This is how the codes are written in this thread
`

include

using namespace std;

int main()
{
int a = 10;
int *ptr = &a;
*ptr = 30;

cout << a << endl;
cout << &a << endl;
cout << a << endl << *ptr << endl;
cout << a << endl << ptr << endl;
Enter fullscreen mode Exit fullscreen mode

return 0;
}
`
A pointer is a variable that stores the address of another bit variable in memory. Pointer returns that input variable in its own language

Top comments (0)