Learn C ProgrammingLearn ProgrammingPrograms On StringsResources

084. Write a program to accept two strings and concatenate them in C language

By September 18, 2012 September 5th, 2018 No Comments
#include<stdio.h>
#include<conio.h>  
#include<string.h>
main()
{
	char *s1,*s2;
	clrscr();
	printf("Enter string 1 : ");
	scanf("%s",s1);
	printf("Enter string 2 : ");
	scanf("%s",s2);
	printf("\nConcatinated string is...%s",strcat(s1,s2));
	getch();
}



Leave a Reply

DEMO01