Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main(int argc, char* argv[])
- {
- char tekst1[30];
- char tekst2[30];
- int i;
- printf("podaj tekst:\n");
- gets(tekst1);
- fflush(stdin);
- for(i=0;i<30&&tekst1[i]!=NULL;i++){
- tekst2[i]=tekst1[i];
- }
- tekst2[i]='\0'; //'\0' = NULL
- puts(tekst2);
- getchar();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement