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
  • Decimal to Binary Conversion Using C
  • C Program to Print a Message using Functions
  • C Program to Find Address locations of Array Elements Using Pointers
  • C Program to Solve Tower of Hanoi Problem Using Recursive and Non-Recursive
  • C Program to Copy a String with out using strcpy() Built in Function
  • C Program Example to Initialize Structure Variable
  • C Program for Addition of Two Numbers
  • C Program to Delete Characters from Given String
  • C Program to Copy Contents From One File to Another
  • Evaluate Algebraic Expression (ax+b)/(ax-b)
  • C Program to Find Second Largest Number in an Array
  • C Program for MERGING of Two Arrays with out using Third Array
  • C Program to Implement SHELL SORT
  • Find Two's Complement of a Binary Number Using C programming
  • C Program to Print Hello World
  • Privacy Policy
  • Cookie Policy
© programming9.com 2026
Back to top