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 Calculate Sum of Marks to Demonstrate Structures
  • C Program for Circumference of a Circle
  • C Program to Find Radius and Circumference of a Circle
  • FCFS CPU Scheduling Algorithm Simulation Using C
  • C Program to Print ASCII values of Characters
  • C Program to Implement Circular Linked List
  • C Program to Convert Infix to Postfix Expression using Stack
  • C Program to Find Sum of Even Integers
  • C Program to find Reverse of a Number
  • Check a Character is Vowel or not Using C
  • C Program to Find Biggest of Two Numbers using Ternary
  • C Program for Fibonacci Series using While Loop
  • C Program to Find Sum of 5 Subjects and Percentage
  • Bit Stuffing Program in C
  • C Program for Multiplication Table using Goto Statement
  • Privacy Policy
  • Cookie Policy
© programming9.com 2026
Back to top