#include <iostream> #include <cmath> using namespace std; /* void replaceValue(int *ptr); int main() { //Pointerlar ile Fonksiyonların Kullanımı // Pointerlar adress tutar ve bu adresdeki veriyi değiştirebiliriz., // Neden !!! ??? : ram de fazladan yer kaplamasını engellemiş olur // sadece pointer ram adresinde işlemi yapar //böylelikle ram den yer kazanmış oluruz int x = 70; // sabit değer olarak kalacak ama pointer ile değeri değiştiricez cout << "value of variable x is " << x << endl; replaceValue(&x); //19 cout << "value of veriable x after the function is " << x << endl; return 0; } void replaceValue(int *ptr) { *ptr = 19; //değerimiz artık 19 oldu cout << "value of veriable x after the function is " << *ptr << endl; cout << endl; cout << "ram deki adress : " << ptr << endl; cout << endl; //Kodun çıktısı...