Advertisement
Sinux1

T7E3.cpp

Apr 9th, 2016
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.51 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6.     //This program illustrates the proper way to copy arrays
  7.  
  8.     string source[] = {"Thursday", "Friday", "Saturday", "Sunday"};
  9.     string destination[4];
  10.  
  11.     for (int subscript = 0; subscript < (4); subscript++)
  12.     {
  13.         destination[subscript] = source[subscript];
  14.     }
  15.  
  16.     cout << destination[0] << endl;
  17.     cout << destination[1] << endl;
  18.     cout << destination[2] << endl;
  19.     cout << destination[3] << endl;
  20.  
  21.  
  22.  
  23.  
  24.     return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement