Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- // A pointer can hold a memory address
- char *p;
- // This is a normal variable
- char test = 'P';
- p = &test;
- // Loop way too many times to access addresses out side of programs ownership
- for (int counter = 0; counter < 2500; counter++)
- {
- cout << *p ;
- p++;
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment