Wskazniki
This commit is contained in:
parent
affc74b1fd
commit
7caafef783
1 changed files with 22 additions and 0 deletions
22
9-Wskazniki/1/main.cpp
Normal file
22
9-Wskazniki/1/main.cpp
Normal file
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
WSKAZNIKI
|
||||
SLUZA DO PRZECHOWYWANIA ADRESU PAMIECI INNYCH ZMIENNYCH DZIEKI WSKAZNIKA MOZEMY MODYFIKOWAC DANE "ZDANIE" PRZEKAZYWAC DANE DO FUNKCJI PRZEZ ADRES
|
||||
|
||||
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main() {
|
||||
int liczba = 60;
|
||||
int *wskaznik = &liczba; //WSKAZNIK PRZECHOWUJE ADRES LICZBY
|
||||
|
||||
cout << "Watrosc liczby = " << liczba << endl;
|
||||
cout << "Adres liczby = " << &liczba << endl;
|
||||
cout << "Wartosc wskaznika = " << wskaznik << endl;
|
||||
cout << "Wartosc wskaznika przez wskaznik = " << *wskaznik << endl;
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Reference in a new issue