Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- char * podlancuch (char *zrodlo, int poczatek, int licznik, char *wynik){
- int i=0;
- for (i=0; i<licznik; i++) wynik[i] = zrodlo[i+poczatek];
- return wynik;
- }
- int main(){
- int poczatek = 4, licznik = 3, i=0;
- char *lancuch = "charakter", wynik[licznik], *wynik2 = podlancuch(lancuch, poczatek, licznik, &wynik);
- for (i=0; wynik[i] != '\0'; i++) printf ("%c", wynik2[i]);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement