
Pointers 311
sr=src;
ptr = memccpy(dest,sr,f,strlen(sr));
if(ptr)
I
*p tr='\0 ';
printf ("String tip to that Character: %s\n", dest);
}
else
printf(//The character wasn't found\n");
I
QmZLTT;
Enter a String: FUNCTIONS
Enter a Character to find in the text: T
String up to that Character: FUNCT
Explanation Thememccpy () function copies number of characters from the source string up to first
occurrence of the given character. It returns to pointer if the given character is found otherwise it
returns NULL.
9.36 Write a program to read two strings through the keyboard^ Replace the contents of
second string with the first string. The lengt ...