 |
|

Which of the following functions will correctly "delete" the element in the array at position p by shifting each array element down one slot?
For example, given the following code:
int a[] = {1,2,3,4,5};
int numelements = 5;
deletenumber(a,2,numelements);
for (int i=0; i<numelements; i++) {
cout << a[i] << endl;
}
The output should be:
1
2
4
5
To "delete" number 3 which is stored in position 2. |
 |
| |
|
|
 |