
312 Programming and Data Structures
Destination before memcpy: Today is Sunday
Destination after memcpy : Tomorrow is Sunday
Explanation The function memccpy () works similarly as in the previous program. It copies the
source string to the destination string. Both the strings are displayed.
9.37 Write a program to display the string through their pointer.
# include <stdio.h>
# include <conio.h>
void mainO
{
char *c,*m;
cm"Central Processing Unit";
nt»' lath Co- Procresser*;
clrscrO
printf ( " 'c ' is pointing the string '% s'\n",c);
printf ( " 'm ' is pointing the string '% s'\n ”,m);
getcheO;
I
OUTPUT:
Y is pointing the string 'Central ...