Question: c++ code... please add comments to explain a bit... also it is requested to follow the restrictions provided in the problem statement. Thanks TASK 5:

c++ code... please add comments to explain a bit...
also it is requested to follow the restrictions provided in the problem statement. Thanks
TASK 5: Write a program that takes size of an array and its elements and removes consecutive occurrences of same number from the list. For the example given below, your program should have space of exactly 7 integers on heap after compression. Do not consume any extra byte on heap For Example: Input: Please enter size: 18 Please enter elements: 1,1,2,2,2,3,4,5,5,5,5,5,7,7,7.2.2,2 Output: Array After Compression: 1,2,3,4,5,7,2 Use the following main() for this question: int main() { int size; cout>size; int* c1 = new int [size]; cout
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
