Write a recursive function, vowels, that return the number Of vowels in a string. Also, write a program to test your function. Write a recursive function that finds and returns the sum of the elements of an int array. Also, write a program to test your function. A palindrome is a string that reads the same both forward and backward. Write a program that uses recursive function to check whether a string is A palindrome. Your program must contain a value-returning recursive function that returns true if the String is a palindrome and false otherwise. Do not use any global variables; use the appropriate parameters.
C++
Complete .cpp .h files
(C++)
Screenshot of code:


output:

code:
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int vowels(string s,int i)
{
if(i==s.size())
return 0;
char ch=s[i];
if(ch>='a'&&ch<='z')
ch=ch-32;
if(ch=='A'||ch=='E'||ch=='I'||ch=='O'||ch=='U')
return 1+vowels(s,i+1);
else
return vowels(s,i+1);
}
int sum(int a[],int i,int n)
{
if(i>n-1)
return 0;
if(i==n-1)
return a[i];
return a[i]+sum(a,i+1,n);
}
bool palin(string s,int i,int n)
{
if(i==n-1)
return s[i]==s[0];
if(s[i]==s[n-1-i])
return palin(s,i+1,n);
return false;
}
int main()
{
string s;
int i,n;
cout<<"Enter string: ";
cin>>s;
cout<<"No of vowels in string is:
"<<vowels(s,0)<<endl;
cout<<"Enter size of array: ";
cin>>n;
int a[n];
cout<<"Enter elements of array: ";
for(i=0;i<n;i++)
cin>>a[i];
cout<<"Sum of array elements is:
"<<sum(a,0,n)<<endl;
cout<<"Enter string to check for palindrome: ";
cin>>s;
n=s.size();
bool k=palin(s,0,n);
cout<<"Given string is palindrome:(True/False):- ";
if(k==1)
cout<<"True";
else
cout<<"False";
}
//please upvote.
Write a recursive function, vowels, that return the number Of vowels in a string. Also, write...