Write a procedure locate to locate a character in a given string. The procedure receives a pointer to a NULL-terminated character string and the character to be located. When the first occurrence of...


Write a procedure locate to locate a character in a given string. The procedure receives a pointer to a NULL-terminated character string and the character to be located.


When the first occurrence of the character is located, its position is returned to main. If


no match is found, a negative value is returned. The main procedure requests a character string and a character to be located and displays the position of the first occurrence


of the character returned by the locate procedure. If there is no match, a message


should be displayed to that effect.



May 26, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here