Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "function.h"
- #include <stdio.h>
- #include <string.h>
- char ReadTwoCharElementsFunction(char* Element1, char* Element2)
- {
- *Element1 = getchar(); getchar();
- *Element2 = getchar(); getchar();
- }
- char ReadStringFunction(char a, char b, char* szString)
- {
- char* p = szString;
- while ((*p = getchar()) != '\n')
- {
- if (*p == 'a') *p = b;
- ++p;
- }
- *p = '\0';
- while (*p != '\0')
- {
- putchar(*p);
- ++p;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement