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

CodeTextPro.com Provides - Web design, Technology gyan, Digital marketing, Online earnings, Seo, Adsense, Technology news, Motivation and inspiration, Latest Technology Affairs, Gadgets, Blogging

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