#include <iostream>
int main() {
// Step 1: Declare the size of the float array
const int arraySize = 5;
// Step 2: Dynamically allocate memory for the float array
float* floatArray = new float[arraySize];
// Step 3: Initialize the elements of the float array
for (int i = 0; i < arraySize; ++i) {
floatArray[i] = 0.0f; // You can assign any desired values here
}
// Step 4: Display the elements of the float array
std::cout << "Float Array Elements: ";
for (int i = 0; i < arraySize; ++i) {
std::cout << floatArray[i] << " ";
}
// Step 5: Deallocate the dynamically allocated memory
delete[] floatArray;
return 0;
}