Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #define N 15
- int main()
- {
- char s[N], t[N];
- char *p, *r;
- int i;
- gets(s);
- printf("|%s|\n", s);
- strcpy(t, "korte");
- /*
- p=s, r=t;
- while (*r++=*p++)
- ;
- printf("|%s|\n", t);
- */
- /*
- gets(s);
- printf("|%s|\n", s);
- strcpy(t, "korte");
- printf("|%s|\n", t);
- strcpy(t, s);
- printf("|%s|\n", t);
- */
- /*
- while (fgets(s, N, stdin) !=NULL)
- {
- for (i=0; s[i]; i++)
- ;
- if (i>0 && s[i-1]== '\n')
- s[i-1]='\0';
- printf("|%s|\n", s);
- }
- */
- /*
- while (fgets(s, N, stdin)!=NULL)
- printf("|%s|\n", s);
- */
- /*
- while (gets(s)!=NULL)
- printf("|%s|\n", s);
- */
- /*
- fgets(s, N, stdin);
- printf("|%s|\n", s);
- */
- /*
- scanf("%s", &s[0]);
- printf("|%s|\n", &s[3]);
- for (i=0; i<N; i++)
- printf("%2d.: %4d %c\n", i, s[i], s[i]);
- */
- // scanf("%s", &s[0]);
- // printf("|%s|", &s[0]);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement