Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <math.h>
- #include <conio.h>
- #include <time.h>
- int zwracam_dlugosc_tablicy(char *szInput)
- {
- return((int)strlen(szInput));
- }
- char kopiuje_tablice( char * myMessage)
- {
- return strcpy(myMessage,"This is my special message");
- }
- int main()
- {
- char szInput[10000];
- char szOutput[10000];
- char ct[10000] = "Przykladowa wiadomosc via pointers";
- char myMessage[255];
- int i = 0;
- fgets(szInput,10000,stdin); // fgets zabezpiecza przed przekroeczniem 10k znakow
- printf("Dlugosc to %d \n", zwracam_dlugosc_tablicy(szInput));
- printf("Skopiowana tablica to %s \n", kopiuje_tablice(szInput));
- getch();
- return EXIT_SUCCESS;
- }
Advertisement
Add Comment
Please, Sign In to add comment