Sinux1

T8E2.cpp

Apr 19th, 2016
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.40 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6.     // A pointer can hold a memory address
  7.     char *p;
  8.     // This is a normal variable
  9.     char test = 'P';
  10.  
  11.  
  12.     p = &test;
  13.     // Loop way too many times to access addresses out side of programs ownership
  14.     for (int counter = 0; counter < 2500; counter++)
  15.         {
  16.             cout << *p  ;
  17.             p++;
  18.         }
  19.  
  20. return 0;
  21. }
Add Comment
Please, Sign In to add comment