My Project - Video Waker Alarm
Get Video alarm on Google Play

concatenate string c code

concatenate string c code. C program to concatenate strings into new array without using the built in function. The built in function to concatenate the string is strcat() which is included in string header file i.e in “string.h”. There are many strings function defined in c header. You can refer to other c program which implement string operations.

concatenate string c code


char destination[20] ;
int len, len1;

int catstr ( char *, char *);

int main( )
     char str1[20];
     char str2[20];
     printf("Enter the string \n");
     printf("\nenter the string you want to concatenate \n");
     catstr ( str1, str2 ) ;
     printf ( "\nconcatenated string = %s", destination ) ;

int catstr(char *d, char *b)
    for(int i=0; i<len; i++)

    for(int i=0; i<len1; i++)

output of concatenate string c code:

concatenate string c code output :  concatenate string c code

Leave a Reply

Your email address will not be published. Required fields are marked *