MeehoweCK

Untitled

Mar 15th, 2021
640
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.41 KB | None | 0 0
  1. // zadanie 3.
  2. #include <iostream>
  3.  
  4. using namespace std;
  5.  
  6. void zwolnij_zasob(int* tab)
  7. {
  8.     delete[] tab;
  9. }
  10.  
  11. int main()
  12. {
  13.     int* tab = new int[6];
  14.     for(unsigned i = 0; i < 6; ++i)
  15.     {
  16.         tab[i] = i;
  17.         cout << tab[i] << '\t';
  18.     }
  19.     cout << endl;
  20.     zwolnij_zasob(tab);
  21.     for(unsigned i = 0; i < 6; ++i)
  22.         cout << tab[i] << '\t';
  23.     cout << endl;
  24.     return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment