Dynamically allocate an array of 3 `Point` objects on the heap using `new[]`. A `Point` has an integer `x` and `y`. Read 6 integers from input to populate the array. Print them sequentially, then use `delete[]` to free the array.
6 space-separated integers.
Print each point formatted as 'P: [x], [y]' on a new line.
Must use new[] and delete[].
1 2 3 4 5 6
P: 1, 2
P: 3, 4
P: 5, 6
To allocate contiguous arrays of objects on the heap, you must use `new[]`, and to avoid partial memory leaks, you must clean them up specifically with `delete[]`.
#include <iostream>
class Point {
public:
int x, y;
};
int main() {
// Allocate dynamic array of 3 Points, read data, print, and clean up
return 0;
}Embedded systems rely on efficient low-level programming to interact directly with hardware. In this course, you will learn how to write practical Embedded C programs used in real microcontroller-based systems. Rather than focusing only on theory, this course follows a practice-driven approach. Each lesson includes hands-on coding exercises that simulate real firmware development tasks used