Declare a character array, and initialize it to a suitable string. Use a loop to change every other
character to uppercase.
Hint: In the ASCII character set, values for uppercase characters are 32 less than their lowercase
counterparts.
Please write a string/array program to fulfill this prompt
#include<iostream>
usingnamespace std;
int main()
{
char* arr;
int size=0;
cout<<"\nEnter The Size Of The Char Array : ";
cin>>size;
arr=newchar[size];
cout<<"\nEnter The Char Without Going in Next Line : ";
cin>>arr;
for(int i=0;i<size;i++)
{
arr[i]=arr[i]-32;
}
cout<<arr;
delete[] arr;
return 0;
}
Enter The Size Of The Char Array : 5
Enter The Char Without Going in Next Line : abcde
ABCDE