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
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- C program to Compare Two Strings without using strcmp() function
- 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
- Minimum Number of Manipulations required to make two Strings Anagram Without Deletion of Character
- Concatenate suffixes of a String
- Methods to concatenate string in C/C++ with Examples
- C/C++ Program to Count number of binary strings without consecutive 1's
- Pairs of complete strings in two sets of strings
- Meta Strings (Check if two strings can become same after a swap in one string)
- Number of common base strings for two strings
- Count of strings that become equal to one of the two strings after one removal
- Count of same length Strings that exists lexicographically in between two given Strings
- Check whether two strings can be made equal by reversing substring of equal length from both strings
- C++ program to compare two Strings using Operator Overloading
- Generate all binary strings without consecutive 1's
- Print array of strings in sorted order without copying one string into another
- Strings formed from given characters without any consecutive repeating characters
- C Program to Print Number series without using any loop
- C/C++ program to print Hello World without using main() and semicolon
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.