Discuss the below:
Q(1) Write a recursive function to generate a pattern such as the following pattern:
*
**
***
****
****
***
**
*
The program should prompt the user to enter the number of lines in the pattern. Enter 4 should generate the above pattern.
Q(2) Write a recursive function to generate a patter such as the following pattern:
*
* *
* * *
* * * *
* * *
* *
*
The program should prompt the user to enter the number of lines in the pattern. Enter 4 should generate the above pattern.
Q(3) A palindrome is a string that reads the same both forward and backward. Write a program that uses a recursive function to check whether a string is a palindrom or not. Your program must contain a value returning recursive function that return true if the string is a palindrome and false otherwise. Do not use any global variables; use the appropriate parameters.