Question: C programming Qusetion: - Header file named lab2functions.h. In this file, place the following lines: #ifndef LAB2FUNCTIONS #define LAB2FUNCTIONS // here is where your 4

C programming Qusetion:

- Header file named lab2functions.h. In this file, place the following lines: #ifndef LAB2FUNCTIONS #define LAB2FUNCTIONS // here is where your 4 function prototypes will go #endif

Note: Program the functions simple.

Print a character array. Write a function called printCharArray that will print the elements of a char array, 10 per line. The characters should be separated by one space. The parameters to the function are: 1) an array of characters 2) the size of the array (of type size_t )

Count the number of letters in a character array. Write a function named countLetters that will count and return the number of letters (either uppercase or lowercase) that appear in the array. The parameters to the function are: 1) an array of characters 2) the size of the array (of type size_t )

Determine the number of elements that are the same in two arrays. Write a function named numMatches that compares the elements in two arrays and counts how many elements are the same. The function only compares array elements with the same index, array1[0] with array2[0], array1[1] with array2[1], etc. The arrays are assumed to have the same number of elements. The parameters to the function are: 1) the first array of characters 2) the second array of characters 3) the size of the arrays (of type size_t )

Replace all of the lowercase letters in the array with the corresponding capital letters. Write a function named capitalize that looks for lowercase letters in the array. When a lowercase letter is found, the array element should be changed to the corresponding capital letter. The parameters to the function are: 1) an array of characters 2) the size of the array (of type size_t )

- Create a source file named lab2functions.c In this file, place the implementations (the full header and body) of the four functions above. lab2functions.c should NOT have a main function. Start the file with comments and an include: // header comments #include "lab2functions.h" // implementation of printCharArray // implementation of countLetters // implementation of numMatches // implementation of capitalize

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!