string strcat function in c

Solutions on MaxInterview for string strcat function in c by the best coders in the world

showing results for - "string strcat function in c"
Giulia
15 Jan 2017
1#include <stdio.h>
2#include <string.h>
3
4int main() {
5   char str1[100] = "This is ", str2[] = "A Name";
6
7   // concatenates str1 and str2
8   // the resultant string is stored in str1.
9   strcat(str1, str2);
10
11   puts(str1);
12   puts(str2);
13
14   return 0;
15}