Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main(){
- char a[50],b[50];
- int i=0,k=0;
- printf("First String: ");
- gets(a);
- printf("Second String: ");
- gets(b);
- while(a[i]!='\0'){
- i++;
- }
- while(b[k]!='\0'){
- a[i]=b[k];
- i++;
- k++;
- }
- a[i]='\0';
- printf("\nConcatenated String is: %s\n",a);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement