programming9
  • Flowcharts
  • Programs
      • Back
      • C Programs
      • C++ Programs
      • Java Programs
      • Python Codes
      • HTML Codes
      • Java Script Codes
      • SQL Codes
  • Tutorials
      • Back
      • Java Tutorials
      • Competitive Programming
      • Python Tutorials
      • C Programming
  • Blog
  • Login

C Program to CONCATENATE Two Strings using strcat()

Details
Written by: RajaSekhar
Category: C Programs
  • C Strings
#include <stdio.h>
#include <string.h>
main()
{
    char s1[20], s2[20];
    printf("\nEnter first string: ");
    gets(s1);
    printf("\nEnter second string: ");
    gets(s2);
    strcat(s1, s2);
    printf("\nThe concatenated string is: %s", s1);
    getch();
}

 OUTPUT:

Enter first string: Programming

Enter second string: .com

The concatenated string is: Programming.com

The same program can write with out using STRCAT() Function

Previous article: C Program to Copy Contents From One File to Another Prev Next article: C Program to Compare Two Strings using strcmp() Next
  • Fizz Buzz Implementation in C
  • C Program to Simulate PRIORITY CPU Scheduling Algorithm
  • C Program to Sort an Array using SELECTION SORT
  • C Program to Print ASCII values of Characters
  • Swap Two Static Numbers Using C
  • C Program to Convert Infix to Postfix Expression using Stack
  • C Program to ADD two MATRICES
  • C Program for Call By Reference
  • C Program to Find Sum of Odd Integers
  • C Program to Solve Tower of Hanoi Problem Using Recursive and Non-Recursive
  • C Program to Find Sum of Individual Digits of a Positive Integer Number
  • C Program to Swap Two Numbers without using Third Variable
  • C Program to Print Pyramid of Numbers
  • Decimal to Binary Conversion Using C
  • C Program to Print Prime Numbers upto a given Number
  • Privacy Policy
  • Cookie Policy
© programming9.com 2026
Back to top