trojanxem

Untitled

Jan 4th, 2013
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.73 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <math.h>
  4. #include <conio.h>
  5. #include <time.h>
  6.  
  7.  
  8. int zwracam_dlugosc_tablicy(char *szInput)
  9. {
  10.     return((int)strlen(szInput));
  11. }
  12. char kopiuje_tablice( char * myMessage)
  13. {
  14.  
  15.  
  16.  
  17.     return  strcpy(myMessage,"This is my special message");
  18. }
  19. int main()
  20. {
  21.     char szInput[10000];
  22.     char szOutput[10000];
  23.     char ct[10000] = "Przykladowa wiadomosc via pointers";
  24.     char myMessage[255];
  25.  
  26.     int i = 0;
  27.    fgets(szInput,10000,stdin);    // fgets zabezpiecza przed przekroeczniem 10k znakow
  28.  
  29.      printf("Dlugosc to %d \n", zwracam_dlugosc_tablicy(szInput));
  30.      printf("Skopiowana tablica to %s \n", kopiuje_tablice(szInput));
  31.      getch();
  32.      return EXIT_SUCCESS;
  33.  
  34. }
Advertisement
Add Comment
Please, Sign In to add comment