Untitled


SUBMITTED BY: Guest

DATE: Nov. 25, 2014, 4:59 p.m.

FORMAT: C++

SIZE: 371 Bytes

HITS: 792

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4. void flip(char* str)
  5. {
  6. char *p1=str;
  7. char *p2=str+1;
  8. char temp;
  9. while(*p1&&*p2)
  10. {
  11. temp=*p1;
  12. *p1=*p2;
  13. *p2=temp;
  14. p2+=2;
  15. p1+=2;
  16. }
  17. }
  18. void main()
  19. {
  20. char str[]="PenisBurka";
  21. flip(str);
  22. printf("%s",str);
  23. getch();
  24. }

comments powered by Disqus