Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- /*int x = 2;
- int *p=&x;
- cout<<*&x<<endl;
- cout<<p<<endl;
- *p=7;
- cout<<*p<<endl;
- cout<<x;
- /*int v[5] = {0, 3, 4, 1, 2};
- cout<<v<<endl;
- cout<<&v[0]<<endl;
- cout<<&v[1]<<endl;
- cout<<&v[2]<<endl;*/
- /*int *v = new int[7];
- for (int i=0; i<7; i++)
- v[i]=0;
- for (int i=0; i<7; i++)
- cout<<v[i]<<endl;*/
- //2d array dynamic allocation
- int **v = new int *[10];
- for (int i=0; i<10; i++)
- v[i]=new int[2];
- return 0;
- }
- Pointeri
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement