Challenge: Delete an Element at a Specific Index

Test your knowledge by solving a challenge in this lesson.

Problem statement

Your task is to write a function delete_element. In its input parameters, the function will take:

  • Pointer arr of type int by reference. Pointer arr is pointing to dynamically allocated array;

  • Variables size and index of type int.

Get hands-on with 1200+ tech skills courses.