Programming
Python
R
Java
C
C++
C#
WEB
HTML
CSS
JavaScript
BootStrap4
jQuery
SVG
MORE
Examples1
Python
GO
R
Java
C
C++
C#
Examples2
Python
R
Java
C
C++
C#
HTML
CSS
JavaScript
BootStrap4
jQuery
SVG
Seo Tools
Code Minifier
Code Beautifier
Language Compiler
Misc Tools
File Converter
References
C
C++
Python
Java
PHP
JavaScript
Examples
Python
R
Java
C
C++
C#
HTML
CSS
JavaScript
BootStrap4
jQuery
SVG
Home
About
Contact
JetPack
Multi Themes-->>
Code it ALL
Scroll TOP
strcat() in C - CodeGK
Δ C Examples
Hello_world
"Hello World" program in C
Break
Break out of For Loop in C
Break out of While Loop in C
Strings
String Declaration in C ?
String Initialization in C ?
strlen() in C
strcpy() in C
strcat() in C
strcmp() in C
For_loop
Number Loop in C
Iterate Through String in C
Variables
Global Variable in C
Local Variable in C
Booleans
C Booleans
Arrays
Character Array in C
Integer Array in C
While_loop
While Loop in C
Recursive_function
Factorial with C Function Recursion
Sum of Natural Numbers with C function Recursion
Function
add Two numbers in C
Calculating factorial of number using Recursion in C
Print
puts() in C
printf() in C
printf() for printing various types of Data Types
Continue
Continue in For Loop in C
Continue in While Loop in C
If_else
IF in C
ELSE in C
Else-If in C
Numbers
Integers in C
Float in C
Double in C
Syntax
Right Syntax in C
Wrong Syntax in C
Operators
Comparison Operators in C
Arithematic Operators in C
Assignment Operators in C
Logical Operators in C
Constants
Constants in C
Violating-Constants in C
Structures
Initializing a Structure in C
Assignment of Structure in C
♦ strcat() in C
♣ Example5: strcat() in C
strcat()
is a in-built C method(function) for concatenating two strings.
In this example, the program will append string last to name.
Example
Input:
Run CODE
Reload Code
Copy Code
#include
#include
int main() { char name[] = "John "; char last[] = "Doe"; // concatenating name with last_name strcat(name, last); puts(name); }
Output:
Strings
strcat() in C