// This is the pseudocode for an ‘iterative’ binary search procedure CSC 219: Programing in C Lab 5 Using arrays and pointers to manipulate strings In this lab you will implement 4 string functions,...

1 answer below »
refer to attached file


// This is the pseudocode for an ‘iterative’ binary search procedure CSC 219: Programing in C Lab 5 Using arrays and pointers to manipulate strings In this lab you will implement 4 string functions, two using array notation and two using pointers. The functions must have the signatures given below. You may not use any C string library functions. The functions are: · int my_strlen (char s []) – This function returns the number of characters in a string. You should use array notation for the function. · int my_strcpy (char s [], char [] t) – This function overwrites string s with a copy of the characters in string t. The copy should succeed only if the length of s is greater than or equal to the length of t. If the copy succeeds, the function returns 1. If the copy cannot be done, the function should return -1. You should use array notation for this function. · char * my_strcat (char s [], char t []) – This function dynamically allocates enough memory to hold a new string which will be the concatenation of string s followed by string t. The new string is returned. Strings s and t are not changed. Use pointers for this function. · void my_strreverse (char s []) – This function overwrites the contents of string s with the reverse of string s. Use pointers to do the reversing. You will need a main function to test all of the other functions. PAGE 1
Answered Same DayMar 10, 2022

Answer To: // This is the pseudocode for an ‘iterative’ binary search procedure CSC 219: Programing in C Lab 5...

Neha answered on Mar 11 2022
119 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here