Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- #define LEN 128
- int main(int argc, char **argv)
- {
- char mas[LEN];
- fgets(mas, LEN, stdin);
- int count = strlen(mas);
- for (int i = 0; i < count; i++){
- printf("%d:[%c]",i , mas[i]);
- }
- mas[count-2] = '!';
- mas[0] = '?';
- printf("\n");
- printf(mas);
- scanf("%s", mas);
- count = strlen(mas);
- for (int i = 0; i < count; i++){
- printf("%d:[%c]",i , mas[i]);
- }
- mas[count-1] = '!';
- mas[0] = '?';
- printf(mas);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement