Created
April 20, 2018 19:06
-
-
Save saifsmailbox98/7f6f3c94ccc2d04ed804b3cecbe126c5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| void main() | |
| { | |
| char a[50], b[50], c[50]; | |
| int i = 0; | |
| printf("Enter the first string: "); | |
| gets(a); | |
| printf("Enter the second string: "); | |
| gets(b); | |
| for(; a[i]!='\0';i++){ | |
| c[i] = a[i]; | |
| } | |
| for(int j=0; b[j]!='\0'; j++, i++){ | |
| c[i] = b[j]; | |
| } | |
| c[i] = '\0'; | |
| printf("%s(length=%d)", c, i); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment