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 for String Concatenation without using strcat()

Details
Written by: RajaSekhar
Category: C Programs
  • C Functions
#include <string.h>
#include <stdio.h>

int main()
{
    int i,len=0,j;
    char str[50],str1[50],ch,ch1;
    printf("\nEnter the First String : " );
    gets(str);
    printf("\nEnter the Second String : " );
    gets(str1);
    for(i=0; str[i]!='\0'; i++)
    {
        len++;
    }
    for(i=0; str1[i]!='\0'; i++)
    {
        str[len++]=str1[i];
    }
    str[len]='\0';
    printf("\n Concatenated String is: %s ",str);
    return 0;
}

 OUTPUT:

Enter the First String : Programming9

Enter the Second String : .com

 Concatenated String is: Programming.com
Previous article: C Program to Find Simple Interest Prev Next article: C Program to Print Reverse of a String without strrev() function Next
  • C Program to Find Biggest among Three Numbers
  • C Program to Reverse Elements in Array
  • C Program for Sum of Digits of a Number
  • C program to Convert Number to Words
  • C Program to Print PRIME Numbers in a Given Range
  • C Program to Find Area of a Triangle
  • C Program to Solve Sum of Series 1-x2/2! +x4/4!-x6/6!+x8/8!-x10/10!
  • C Program to Print Pyramid of Numbers
  • C Program to Find Factorial of a Number using Functions
  • C Program to Calculate Sum of Odd Values in an Array
  • Simulate Bankers Algorithm for Deadlock Avoidance Using C
  • C Program to Implement Structure with Array
  • C Program for String Comparison without using Built in Function
  • C Program to Calculate Sum of Even Values in an Array
  • C Program to Find Area of a Square
  • Privacy Policy
  • Cookie Policy
© programming9.com 2026
Back to top