Thursday, March 3, 2016

strcat() function example in C

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
#include<stdio.h>
#include<string.h>

main()
{
 char name[20],name2[20];
 printf("Enter your name ?\n");
 gets(name);
 printf("Enter name2?.\n");
 gets(name2);
 strcat(name,name2);
 printf("\n\n\n\n");
 printf("%s",name);
 
}

No comments:

Post a Comment

Thank you for commenting. Please wait for response :)