Question: Write a function named append that accepts three arguments. The first two arguments passed to append are c-strings to be appended (the second c-string is appended to the first). The third argument passed should be the size of the character array passed as the first argument.
Before appending, append should verify there is enough space in the character array to accept the appended string. If there is, then the append operation should proceed and append should return the total size of the appended string. If the appended string is too large to fit inside the character array, then append should return -1 without appending.
Demonstrate the function in a program.
Note: You may find the c-string functions strlen() and strcat() useful.
In other words, write a function that verifies there is sufficient space to append a c-string to an existing c-string. If there is, append and return the size of the appended string. If not, return -1.
Use the c programming language to prepare this program.