Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- void promena(char *niza, char *niza1, int n)
- {
- strcat(niza1,niza+n);
- niza[n]='\0';
- strcat(niza,niza1);
- }
- int main ()
- {
- char niza[100],niza1[100];
- int n;
- gets(niza);
- gets(niza1);
- scanf("%d",&n);
- promena(niza,niza1,n);
- puts(niza);
- }
- /*
- #include <stdio.h>
- #include <string.h>
- int main(){
- char str1[100], str2[100];
- int position;
- char sePoslePosition[100];
- gets(str1);
- gets(str2);
- scanf("%d", &position);
- char str3[100];
- int i;
- int index = 0;
- for(i = position - 1; i < strlen(str1); i++) {
- sePoslePosition[index] = str1[i];
- ++index;
- }
- for(i = 0; i < position - 1; i++) {
- str3[i] = str1[i];
- }
- strcat(str3, " ");
- strcat(str3, str2);
- strcat(str3, sePoslePosition);
- printf("%s", str3);
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment