Write a c program to concatenate string - CodeTextPro | Free Web Tutorial

Codetextpro Provides free Web tutorial, HTML, CSS, C, C++, Java, JavaScript, PHP, MySql, Python, Program, Programming Notes, Programming Questions and more.

Programming

Sunday, January 6, 2019

Write a c program to concatenate string

String Concatenate in C

#include<stdio.h>
#include<conio.h>
#include<string.h>
main()
{
char s1[10];
char s2[10];
printf("please enter the first string: ");
gets(s1);
printf("please enter the second string: ");
gets(s2);
strcat(s1,s2);
puts(s1);
getch();
}

No comments:

Post a Comment