Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #define DIM 25
- int main()
- {
- char stringa1[DIM]="GiuseppeGaribaldi",stringa2[DIM];
- int inizio, quanti;
- int s, x = 0;
- inizio = 8;
- quanti = 9;
- for(s = inizio; s < inizio+quanti; s++){
- stringa2[x] = stringa1[s];
- x++;
- }
- printf("%s\n", stringa1); // ritorna GiuseppeGaribaldi
- printf("%s\n", stringa2); // ritorna Garibaldi
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement