Program : C Program to Concat Two Strings without Using Library Function
#include<stdio.h> #include<string.h> void concat(char[],char[]); void main() { char s1[50],s2[30]; printf("n Enter two strings :"); gets(s1); gets(s2); concat(s1,s2); printf("nConcated string is :%s",s1); getch(); } void concat(char s1[],char s2[]) { int i,j; i=strlen(s1); for(j=0;s2[j]!='\0';i++,j++) s1[i]=s2[j]; s1[i]='\0'; }
Output :
Enter two strings : c4learn. com Concated string is :c4learn.com
Incoming search terms:
- Write a program in c language to concatenate two strings without using library functions (4)
- concatenate two string without using string library function in c language (2)
- write a program to concatenate two strings without using library function in c (2)
- wap to append two strings using functions in c (1)
- wap a program in c to concatenate two strings without using the third (1)
- two string concate in cpp program (1)