by Dinesh Thakur

 

#include<stdio.h> 

void copystr(char*,char*);
void main()
{
             char*str1="I am Dinesh Thakur";
             char str2[30];
             clrscr();
             copystr(str2,str1);
             printf("\n %s",str2);
             getch();
 }
            void copystr(char *dest,char *src)
       {
                while(*src!='\0')
                *dest++=*src++;
                *dest='\0';
                return;
       }
 
Output :
 
I am Dinesh Thakur

Follow us