C program to concat 2 Strings without using Library Function.

#include<stdio.h>
#include<conio.h>
int main()
{
    char str1[100], str2[100], i;
    printf("Enter any string: ");
    gets(str1);
    for(i=0; str1[i]!='\0'; i++)
    {
        str2[i] = str1[i];
    }
    str2[i] = '\0';
    printf("\nString 1 = %s", str1);
    printf("\nString 2 = %s", str2);
    getch();
    return 0;
}
C program to concat 2 Strings without using Library Function. C program to concat 2 Strings without using Library Function. Reviewed by on December 25, 2019 Rating: 5

No comments:

Powered by Blogger.