C Program - Concatenate strings



#include <stdio.h>
#include <conio.h>
#include <string.h>

int main()
{
    char a[100], b[100];

    printf("Enter the first string\n");
    gets(a);

    printf("Enter the second string\n");
    gets(b);

    strcat(a,b);
    /*strcat will append string b on string a*/

    printf("String obtained on concatenation is %s\n",a);
    getch();

    return 0;
}

Output
----------


Comments

Popular posts from this blog

Introduction to C++ Programming Language

The Assembly Process Of 8086 Microprocessor-Two Pass Assembling Steps

Installing 8086 Assembler on a Computer