Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstring>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. char a[]="Ana are bere blonda";
  9. int n=strlen(a);
  10. for(int i=0; i<n; i++)
  11. if(a[i]==' ')
  12. a[i]='\0';
  13. char *p=a;
  14. cout<<p<<endl;
  15. int i=0;
  16. while(i<n)
  17. {
  18. for(;*p;p++)
  19. i++;
  20. p++;
  21. i++;
  22. cout<<p<<endl;
  23. }
  24. return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement