Answers for "concatenate two strings without standard library in C"

C
0

concatenate two strings without standard library in C

#include<stdio.h>

void main(void)
{
  char str1[25],str2[25];
  int i=0,j=0;
  printf("\nEnter First String:");
  gets(str1);
  printf("\nEnter Second String:");
  gets(str2);
  while(str1[i]!='\0')
  i++;
  while(str2[j]!='\0')
  {
    str1[i]=str2[j];
    j++;
    i++;
  }
  str1[i]='\0';
  printf("\nConcatenated String is %s",str1);
}
Explanation:
Posted by: Guest on April-24-2022

Code answers related to "concatenate two strings without standard library in C"

Code answers related to "C"

Browse Popular Code Answers by Language