April 2000 QUESTION 2 Total Marks: 15 Marks |
Click here to access other
questions
Click to access |
(a)Write a function,called Copy the signature
of which is given below,which will copy at most n characters from
the string src into the string dst You may assume that dst is a character
string with at least n+1 elements. (b)Write a function,called IsMember the
signature of which is given below which will return a pointer to the
first instance of the character c in the string s If there is no occurrence
of the character in the string,then the function should return NULL (c)Write a function,called RemoveMember
the signature of which is given below,which will take a string s and
return a reference to the string with all occurrences of the character
c removed from the string.For example,calling the function on the
string abcabcabc with the character a to be removed wouldresult in
the string bcbcbc. |