Please make this code below more memory efficient and explainwhat is change:
#include<iostream>
#include<stdlib.h>
#include<time.h>
#include <fstream>
using namespace std;
void bubblesort(int a[],int n);
void readFromFile(int arr[], int N, char *fileName);
int main(){
int arr[1000], N = 1000;
char* fileName = “data.txt”;
readFromFile(arr, N, fileName);
int inputs;
do{
cout <<“*********************************************n”
“* 1:output all value *n”
“* 2:sum of all value *n”
“* 3:all odd numbers *n”
“* 4:all even numbers *n”
“* 5:output middle value *n”
“* 6:output first value *n”
“* 7:output last value *n”
“* 8:Highest value and its location *n”
“* 9:Lowest value and its location *n”
“* 10:Sort and output *n”
“* 11:linear Search *n”
“* 12:Exit *n”
“*********************************************n”;
cout << “Enter choice : “;
cin >> inputs;
switch(inputs){
case 1:{
for(int i=0;i<1000;i++){
cout << arr[i] << “n”;
}
break;
}
case 2:{
int
PayPal Gateway not configured
PayPal Gateway not configured