EmbLogic's Blog

program to attach two string

1#include <stdio.h>
2 #include <string.h>
3int main()
4 {
5 char a[100],b[100];
6  printf(“Enter the first string\n”);
7          fgets(a);
8           printf(“Enter the second string\n”);
9          fgets(b);
10           strcat(a,b);
11           printf(“String obtained on concatenation is %s\n”,a);
12              return 0;
13 }

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>