Computer Science, asked by pragya1052005, 6 months ago

Explain the use of new operator with an example

Answers

Answered by kjjio
1

Answer:

An Example of allocating array elements using “new” operator is given below: int* myarray = NULL; myarray = new int[10]; Here, new operator allocates 10 continuous elements of type integer to the pointer variable myarray and returns the pointer to the first element of myarray.

Explanation:

follow me

Answered by ABHINAV123421
2

An Example of allocating array elements using “new” operator is given below: int* myarray = NULL; myarray = new int[10]; Here, new operator allocates 10 continuous elements of type integer to the pointer variable myarray and returns the pointer to the first element of myarray.

Please mark as the Brainliest Answer and give thanks.

Similar questions