Advertisement
Cayloo

Untitled

Nov 20th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.69 KB | None | 0 0
  1. int main()
  2. {//----------------------------------------------------------Zadanie 5C
  3.     int tab_jed[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };
  4.     int *wsk = tab_jed;
  5.     int **wsk_podw = &wsk;
  6.     int *tab_ws[5];
  7. //---------------------------------------
  8.     tab_ws[0] = &tab_jed[0];
  9.     tab_ws[1] = &tab_jed[1];
  10.     tab_ws[2] = &tab_jed[3];
  11.     tab_ws[3] = &tab_jed[6];
  12.     tab_ws[4] = &tab_jed[10];
  13.     wsk = tab_jed;
  14.     wsk_podw = tab_ws;
  15. //---------------------------------------
  16.     cout << *tab_ws[0] << endl;
  17.     cout << *tab_ws[1] << endl;
  18.     cout << *tab_ws[2] << endl;
  19.     cout << *tab_ws[3] << endl;
  20.     cout << *tab_ws[4] << endl;
  21.  
  22.     cout << *wsk;
  23.     cout << "\n";
  24.    
  25.    
  26.  
  27.     system("pause");
  28.     return 0;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement