0

What's the function of the 'new int' expression?

9th Feb 2019, 12:25 PM
Wanangwah
Wanangwah - avatar
6 Answers
+ 2
Not sure what code you are talking about, but the new keyword is used to allocate memory dynamically (on the heap, at runtime). Use the delete keyword to free that memory when it's no longer needed.
9th Feb 2019, 12:56 PM
Zen
Zen - avatar
0
Amazing Mr Zen. It really allocates memory on a heap. Thank you
9th Feb 2019, 6:20 PM
Wanangwah
Wanangwah - avatar
0
Allocates memory to heap
7th Sep 2020, 7:13 AM
prafful wania
prafful wania - avatar
0
allocate memory on heap
13th Nov 2020, 6:46 AM
Amal mv
Amal mv - avatar
0
Allocates memory to heap
22nd Nov 2020, 12:38 PM
{H}asintha Ranaweera
{H}asintha Ranaweera - avatar
0
Type in the missing data types of the variables a, b, c, and d, where a is an integer, b is a double floating-point number, c is a character, and d is a string.
20th Dec 2021, 1:45 PM
Iskandar