Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <math.h>
- #include <string.h>
- void swapp(char *p, char *q)
- {
- char swa[10];
- strcpy(swa, p);
- strcpy(p, q);
- strcpy(q, swa);
- }
- int main()
- {
- char ch1[10];
- char ch2[10];
- scanf("%s %s", ch1, ch2);
- swapp(&ch1, &ch2);
- printf("%s %s\n", ch1, ch2);
- return 0;
- }
Add Comment
Please, Sign In to add comment