Toggle navigation
Home
Latest pastes
FAQ
Random
BitBin is shutting down!
Register
Login
C++ new operator
SUBMITTED BY:
RavishBhatt
DATE:
June 29, 2016, 8:57 a.m.
FORMAT:
C++
SIZE:
429 Bytes
Raw
Download
Tweet
HITS:
529
Go to comments
Report
#include
<iostream>
using
namespace
std
;
int
main
()
{
int
n
,
*
pointer
,
c
;
cout
<<
"Input an integer
\n
"
;
cin
>>
n
;
pointer
=
new
int
[
n
];
cout
<<
"Input "
<<
n
<<
" integers
\n
"
;
for
(
c
=
0
;
c
<
n
;
c
++
)
cin
>>
pointer
[
c
];
cout
<<
"Elements entered by you are
\n
"
;
for
(
c
=
0
;
c
<
n
;
c
++
)
cout
<<
pointer
[
c
]
<<
endl
;
delete
[]
pointer
;
return
0
;
}
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus