The strchr
function finds the first occurrence of its second argument in its first argument.
So here you'd have to find a way to run strchr
starting at input[start]
, passing it the character '<'
as second argument and store the length that strchr
finds. This then gives you the length that you need to allocate for output.
- Don't forget the
'\0'
character at the end. - Use a library function to copy the string from
input
tooutput
.
Since this is an assignment, you'll probably find out the rest by yourself ...