Computer Science, asked by nsprabha, 8 months ago

Write a recursive function to display only the strings starting with letter 'a' from a list of strings. (Spams will be reported)

Answers

Answered by Anonymous
0

Answer:

// C++ program to reverse a string using recursion

#include <bits/stdc++.h>

using namespace std;

/* Function to print reverse of the passed string */

void reverse(string str)

{

if(str.size() == 0)

{

return;

}

reverse(str.substr(1));

cout << str[0];

}

/* Driver program to test above function */

int main()

{

string a = "Geeks for Geeks";

reverse(a);

return 0;

}

Explanation:

....

Similar questions