Write a program to concanate two strings using library function.

#include<stdio.h>
#include<string.h>
main()
{
    char str1[100],str2[100];
    printf("\nEnter first string=");
    scanf("%s",str1);
    printf("\nEnter second string=");
    scanf("%s",str2);
    strcat(str1,str2);
    printf("\nAfter concatanation the resultant string=%s",str1);
}

No comments:

Post a Comment