Question
Goals The goal of this homework assignment is to get practice writing code in C which uses some more standard library functions. Complete the following
Goals
The goal of this homework assignment is to get practice writing code in C which uses some more standard library functions.
Complete the following functions! Please provide a main function that demonstrates their use and any testing data files you use.
1. int checkSorted (const char*[] strings, int size) (10 points)
The array strings is an array of strings and size is the length of that array. This function
should return 1 if the array strings is sorted and 0 if the array strings is not sorted.
2. Write a function which prints the seconds since the start of the month, using time.h and suitable date/time functions (5 points)
3.Write a function which, given a time_t, prints that times month, day, year, and hour information in GMT and Local time (5 points)
In main, be sure to defend against buffer overflow attacks! No file name should be over 15 characters long, including the file extension!
Further, be sure to follow proper error handling routines (null checks etc)
Failure to defend against buffer overflow and errors will result in -5. Memory leaks will result in -5
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started