Skip to content

Instantly share code, notes, and snippets.

@Dbhardwaj99
Created May 16, 2022 13:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Dbhardwaj99/7ffa3532a0c63ff8e1170d7c95f85230 to your computer and use it in GitHub Desktop.
Save Dbhardwaj99/7ffa3532a0c63ff8e1170d7c95f85230 to your computer and use it in GitHub Desktop.
#include <stdio.h>
int main() {
char s1[100];
scanf("%[^\n]%*c", s1);
char s2[100];
scanf("%[^\n]%*c", s2);
int length, j;
length = 0;
while (s1[length] != '\0') {
length++;
}
for (j = 0; s2[j] != '\0'; j++, length++) {
s1[length] = s2[j];
}
s1[length] = '\0';
printf("%s",s1);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment