Saturday 22 September 2012

String024

Concept of strcpy ( ).

#include <stdio.h>
#include <conio.h>
#include <string.h>
void main ( )
{
           char        source[] = "Sayonara";
           char        target[20];
           clrscr ( );
                       
           strcpy ( target, source );     /* Using for copying element from source to target */
                     
           printf("\n\n\n\t\t Source String.....: %s", source);
           printf("\n\n\n\t\t Target String.....: %s", target);
             
           getch ( );
}
Click here to contact us

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...