Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

// 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 »

This is the pseudocode for an ‘iterative’ binary search procedure
CSC 219: Programing in C
Lab 5
Using a
ays and pointers to manipulate strings
In this lab you will implement 4 string functions, two using a
ay notation and two using pointers. The functions must have the signatures given below. You may not use any C string li
ary functions. The functions are:
· int my_strlen (char s []) – This function returns the number of characters in a string. You should use a
ay 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 a
ay 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_st
everse (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 Day Mar 10, 2022

Solution

Neha answered on Mar 11 2022
111 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