From 87511b7e7bec079a1c48be483decbeee8a1f195a Mon Sep 17 00:00:00 2001 From: Angel Dimitriev Date: Wed, 23 Feb 2022 02:23:26 +0200 Subject: Update README.md --- Sem. 01/README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Sem. 01/README.md b/Sem. 01/README.md index db4774d..a76fc72 100644 --- a/Sem. 01/README.md +++ b/Sem. 01/README.md @@ -7,22 +7,22 @@ ```c++ int main() { -int a = 10; // int in the stack -int* ptr = new int(30); // int in the dyniamic memory (we use a pointer on the stack to point to the int) + int a = 10; // int in the stack + int* ptr = new int(30); // int in the dyniamic memory (we use a pointer on the stack to point to the int) -std::cout << "First number: " << a << " " << " second number: " << (*ptr) << std::endl; + std::cout << "First number: " << a << " " << " second number: " << (*ptr) << std::endl; -std::cout << "Address of second number" << ptr << std::endl; + std::cout << "Address of second number" << ptr << std::endl; -delete ptr; //!!! + delete ptr; //!!! -ptr = &a; -std::cout << "Address of first number" << ptr << std::endl; + ptr = &a; + std::cout << "Address of first number" << ptr << std::endl; -int& b = a; //another name for the variable -b = 30; + int& b = a; //another name for the variable + b = 30; -std::cout << "First number" << a << std::endl + std::cout << "First number" << a << std::endl } ``` -- cgit v1.3.1-23-gd82d