## Assignment 3 CS221: C and Systems Programming (Solved)

### computer science

##### Description

Assignment 3 CS221: C and Systems Programming – Fall 2019

In the problems for this assignment, you are to complete the body of the functions as specified. You may not modify the functions signatures, that is, adding any new parameters or changing the data type of the parameters in any way. You may not use square brackets and any type of loops in your solutions.

1. Write the body of the function below so that it recursively converts all lowercase letters in a string to uppercase. For example: toUpperCase("aBcD?2") -> "ABCD?2" void toUpperCase ( char * str ) { }

2. Write a recursive program that receives an array of positive integers and its length and returns the largest number in the array. For example: int arr[5] = {-2, 31, 4, 12, -8}; findMax(arr, ...) -> 31 int findMax ( int * arr , int p , int max ) { }

3. Write a program in C to reverse a string using recursion. For example: reverse("abcde", ...) -> "edcba" void reverse ( char * str , int i , int s ) { }

4. Write a function in C to convert a decimal number to binary using recursion. For example: convertToBinary(10) -> 1010 long convertToBinary ( int num ) { }

5. Write a function that checks whether a given string is a palindrome or not, recursively. Palindrome is a word, phrase, or sequence that reads the same backward as forward. For example: isPalindrome("abcba", ...) -> true isPalindrome("abcb1", ...) -> false bool isPalindrome ( char * str , int s , int e ) { } Submission: Prior to the deadline upload only one file Answers.{pdf, doc(x), txt} file containing your answer to all problems to Canvas. Include your name and student ID at the top of the document. Submission on Canvas will be opened one week prior to the deadline.

## Related Questions in computer science category

##### Disclaimer
The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.