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,
4 months ago
Hindi,
4 months ago
English,
4 months ago
Biology,
9 months ago
Computer Science,
9 months ago