Program for string function strcat() in c programming language.


/*C Program for string function strcat() in c programming language.*/

#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
  char str1[20],str2[20];
  clrscr();
  puts("Enter your string :");
  gets(str1);
  puts("Enter another string :");
  gets(str2);
  puts("\nThe previous entered string are :");
  puts(str1);
  puts(str2);
  strcat(str1,str2);
  puts("\nStrings after concatenation are :");
  puts(str1);
  getch();
}
============================
OUTPUT:-
Enter your string :
Windows                                                                         
Enter another string :                                                         
Computer                                                                       
                                                                               
The previous entered string are :                                              
Windows                                                                        
Computer                                                                        
                                                                               
Strings after concatenation are :                                              
WindowsComputer                                                                                    

Comments