Compare the following statement int a=5; int*a=new int(5);
Answers
Answered by
0
Answer:
int*a = new int(5) - here we are dynamically allocating memory for an integer which is initialized to 5.
Answered by
0
Answer:
int a=5;
// it initializes the value dynamically
int *a=new int(5);
// it initializes value at run time
PLEASE GIVE BRAINLIEST AND THANKS IF IT IS CORRECT AND HELPFUL.
Similar questions
Math,
5 months ago
Math,
5 months ago
Math,
5 months ago
Biology,
11 months ago
Computer Science,
11 months ago