Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 102cc02

Browse files
Dynamic memory allocation
1 parent e394935 commit 102cc02

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

‎dynamic.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#include<iostream>
2+
using namespace std;
3+
int main()
4+
{
5+
int *p;
6+
p=new int;
7+
*p=100;
8+
cout<<"Value to which p points is "<<*p;
9+
cout<<endl;
10+
delete(p);
11+
cout<<"Value to which p static points is "<<*p;
12+
cout<<endl;
13+
return 0;
14+
}
15+
16+

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /