Advertisement
Sabid2830

String2

Dec 14th, 2019
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.30 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     char str1[50]="Manners maketh ";
  5.     char str2[50]="Man";
  6.     int i=0,len=0, j=0;
  7.     while(str1[i]!='\0')
  8.     {
  9.         i++;
  10.         len++;
  11.     }
  12.     while(str2[j]!='\0')
  13.     {
  14.         str1[len+j]=str2[j];
  15.         j++;
  16.     }
  17.     printf("str1=%s\n",str1);
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement