Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Header_le: This header_le must be named assignment 2.h Guard the header and include the prototypes of your functions for the entire assignment 2. Souree_le:

image text in transcribed

1. Header_le: This header_le must be named assignment 2.h Guard the header and include the prototypes of your functions for the entire assignment 2. Souree_le: The source_le must be named assignment 2.c Implement your solutions here. 3. Mainle: Create a main_le named main s where you execute at least two test cases for each function. Problem 1: Implement a function that determines if a word is palindrome. Examples of palindrome words: labba", Anna", Kayak". The function must return TRUE when the word contains only a single character. The function must return TRUE when it received a palindrome word, and FALSE otherwise. The function should be case insensitive. Assume that words are only composed of both capital or lower-case letters. Hint: Use the tolower0 or toupper) functions declared in ctype h. See http://examples.yourdictionary palindrome examples. The function must have the following properties: 1. Name: IsPalindrome 2. Return type: int 3. Input type: Non-mutable pointer to a string (ie., a constant string). Problem 2: Write a function that concatenates two strings. You are allowed to use strien0 from string.h. Do not use strcat0. The function must have the following properties: 2. Return type: nothing 3. Argument1 Input type: Non-mutable pointer to a string (i.e., a read-only string). 4. Argument 2 Input type: Non-mutable pointer to a string (.e., a read-only string). 5. Argument 3-Output type: Mutable pointer to a string. Problem 5: Write a function that multiplies two matrices. The memory layout for both matrices are row-major, i.e., are stored in a pli ray; see Problem 3 for notes on row-major matrices. The function must have the following properties: 1. Name: MultiplyMatrices 2. Return type: nothing 3. Argument 1 Input type: Integer with the number of rows of matrix 1 4. Argument 2 -Input type: Integer with the number of cols of matrix 1 5. Argument 3-Input type: Non-mutable pointer to the rst (top let) oat element of the matrix 6. Argument 4 Input type: Integer with the number of rows of matrix 2 7. Argument 5 Input type: Integer with the number of cols of matrix 2 8. Argument 6 Input type: Non-mutable pointer to the rst top left) oat element of the matrix2. 9. Argument 7-Output type: Mutable pointer to the-nt (top left) oat element of the matrix holding the results. 1. Header_le: This header_le must be named assignment 2.h Guard the header and include the prototypes of your functions for the entire assignment 2. Souree_le: The source_le must be named assignment 2.c Implement your solutions here. 3. Mainle: Create a main_le named main s where you execute at least two test cases for each function. Problem 1: Implement a function that determines if a word is palindrome. Examples of palindrome words: labba", Anna", Kayak". The function must return TRUE when the word contains only a single character. The function must return TRUE when it received a palindrome word, and FALSE otherwise. The function should be case insensitive. Assume that words are only composed of both capital or lower-case letters. Hint: Use the tolower0 or toupper) functions declared in ctype h. See http://examples.yourdictionary palindrome examples. The function must have the following properties: 1. Name: IsPalindrome 2. Return type: int 3. Input type: Non-mutable pointer to a string (ie., a constant string). Problem 2: Write a function that concatenates two strings. You are allowed to use strien0 from string.h. Do not use strcat0. The function must have the following properties: 2. Return type: nothing 3. Argument1 Input type: Non-mutable pointer to a string (i.e., a read-only string). 4. Argument 2 Input type: Non-mutable pointer to a string (.e., a read-only string). 5. Argument 3-Output type: Mutable pointer to a string. Problem 5: Write a function that multiplies two matrices. The memory layout for both matrices are row-major, i.e., are stored in a pli ray; see Problem 3 for notes on row-major matrices. The function must have the following properties: 1. Name: MultiplyMatrices 2. Return type: nothing 3. Argument 1 Input type: Integer with the number of rows of matrix 1 4. Argument 2 -Input type: Integer with the number of cols of matrix 1 5. Argument 3-Input type: Non-mutable pointer to the rst (top let) oat element of the matrix 6. Argument 4 Input type: Integer with the number of rows of matrix 2 7. Argument 5 Input type: Integer with the number of cols of matrix 2 8. Argument 6 Input type: Non-mutable pointer to the rst top left) oat element of the matrix2. 9. Argument 7-Output type: Mutable pointer to the-nt (top left) oat element of the matrix holding the results

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Relational Database And Transact SQL

Authors: Lucy Scott

1st Edition

1974679985, 978-1974679980

More Books

Students also viewed these Databases questions

Question

2. What potential barriers would you encourage Samuel to avoid?

Answered: 1 week ago

Question

6. How would you design your ideal position?

Answered: 1 week ago