Thursday 23 January 2014

Filled Under:

* WAP to concate strings */

/* WAP to concate strings */

#include<stdio.h>
#include<conio.h>
void main()
{
    char str1[100],str2[100],str[100];
    int i=0,j=0;

    printf("Enter First String:");
    gets(str1);

    printf("Entre Second String:");
    gets(str2);

    while(str1[i]!='\0')
    {
        str[j]=str1[i];
        i++;j++;
    }

    i=0;
    while(str[i]!='\0')
    {
        str[j]=str2[i];
        i++;j++;
    }

    printf("The Concate Of Entered Strings Is:");
    puts(str);

    getch();

}

0 comments:

Post a Comment