0
May you explain me dynamic memory for arrays of this code, please?
I want to know about meaning of al thel code with cout descriptions. https://code.sololearn.com/cie5b03NsO7q/?ref=app
11 Réponses
+ 1
write new int (1) instead of NULL; and check.
+ 1
1 and Null are different things
Output:
p and &p show pass to this variable
*p is name variable
new int - memory allocation to this variable
Also 0 and Null are different things
0- variable value
Null- empty variable
delete- make variable emty
If I don't ansver to all your questions please find it in Google
+ 1
Yes, I do
+ 1
Yes, you can write number or variable.
+ 1
Yes, it is.
0
Why output changed after writing new int (1) instead of NULL?
0
Hard maker, so you say that we can create NULL with delete, don't you?
0
Thanks a lot☺️
0
This is the first time, I saw somebody wrote (number) after int. Can we write any number instead of 1?
0
Is int (1) same with int a=1 ?
0
Hmm. Thank you so much ☺️