Advertisement
Guest User

Untitled

a guest
Jan 18th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. #include <iostream>
  2. // co 2 numer to 5
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. char text1[] = "123456789012345"; // size of array? 16 last element is not visible [0]
  8. char text2[] = "fsa2nioawaaiofamanaieaoba";
  9. cout <<text1<<endl;
  10. int i=0;
  11.  
  12. while (text1[i]!=0){
  13. cout << text1[i]<<endl;
  14. i++;
  15. }
  16. int m = sizeof (text1);
  17. cout << "Size of text1 is "<<m<<endl;
  18. text1[9] = 0;
  19. cout <<text1<<endl;
  20. i=0;
  21.  
  22. while (text2[i]!=0){
  23. text2[i]='5';
  24. i+=2;
  25. }
  26. cout <<text2<<endl;
  27. cout << " " << endl;
  28. return 0;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement