This exercise is available at https://study.find-santa.eu/exercises/c/pointers/.
For the sake of the environment, please avoid printing these instructions in the future. Thank you!

Pointers

  1. Initialize arrays
    Implement the following functions:
    int main();
    void zeros(int* array, int count);
    void ones(int* array, int count);
    void range(int* array, int count);
    zeros(.) gets an array and the number of its elements. It should set each element to zero. ones(.) does the same as zeros, but sets each value to one. range(.) sets the array to 0, 1, 2, 3, ..., count-1
    Do not implement main(.) in the source file containing the above functions.
    In a separate file called main.c, implement main(.) to initialize an array, call each of the above functions and print the array right after each function call.
    Name the source file: initialize_arrays.c
  2. String operations
    Implement the following functions:
    // Change the string so that all alphabetical characters are upper case.
    void to_upper(char* array);
    
    // Return true if there are any upper case characters.
    bool has_upper(char* array);
    
    // Return true if all alphabetical characters are upper case.
    bool is_upper(char* array);
    
    // Change the string so that all alphabetical characters are lower case.
    void to_lower(char* array);
    
    // Return true if there are any lower case characters.
    bool has_lower(char* array);
    
    // Return true if all alphabetical characters are lower case.
    bool is_lower(char* array);
    In a separate file called main.c, implement a function to run and test your code. This function has to be called by the existing main(.) function. Name the source file: string_manipulation.c