Advertisement
Guest User

Untitled

a guest
Jan 18th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.50 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <time.h>
  3. #include <string.h>
  4.  
  5. char * kopiuj (char * cel, char *napis);
  6.  
  7. int main (int argc, char * argv[]) {
  8.  
  9.    char tab[100];
  10.    char * wsk;
  11.  
  12.    for (int i =0; i< argc; i++) {
  13.       printf ("Parametr nr %d: %s", i,  argv[i]);
  14.       printf("\n");
  15.    }
  16.   if (argc>1){
  17.    wsk=kopiuj(tab, argv[1] );
  18.    printf("%s \n %s", tab, wsk);
  19.    }
  20.  
  21.    return 0;
  22. }
  23.  
  24.  
  25. char * kopiuj (char * cel, char *napis) {
  26.    strcpy (cel, napis);
  27.  
  28.    return strchr(napis, 'n');
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement