Given two strings str1 and str2, the task is to write a C Program to concatenate these two strings without using the strcat() function
Input: str1 = "hello", str2 = "world" Output: helloworld Input: str1 = "Geeks", str2 = "World" Output: GeeksWorld
- Get the two Strings to be concatenated
- Declare a new Strings to store the concatenated String
- Insert the first string in the new string
- Insert the second string in the new string
- Print the concatenated string
Below is the implementation of the above approach:
First string: Geeks Second string: World Concatenated string: GeeksWorld
Don’t stop now and take your learning to the next level. Learn all the important concepts of Data Structures and Algorithms with the help of the most trusted course: DSA Self Paced. Become industry ready at a student-friendly price.
- Concatenate strings in any order to get Maximum Number of "AB"
- Concatenate the strings in an order which maximises the occurrence of subsequence "ab"
- C++ program to concatenate a string given number of times
- Program to add two binary strings
- Program to check if two strings are same or not
- Program to accept a Strings which contains all the Vowels
- A Program to check if strings are rotations of each other or not
- C Program to Reverse Array of Strings
- Concatenate suffixes of a String
- Program to accept Strings starting with a Vowel
- C++ program to compare two Strings using Operator Overloading
- C Program to Sort an array of names or strings
- Methods to concatenate string in C/C++ with Examples
- Python program to find uncommon words from two Strings
- Program to build a DFA to accept strings that start and end with same character
- C/C++ Program to Count number of binary strings without consecutive 1's
- Program to build a DFA that accepts strings starting and ending with different character
- Meta Strings (Check if two strings can become same after a swap in one string)
- Count of same length Strings that exists lexicographically in between two given Strings
- Search in an array of strings where non-empty strings are sorted
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.