C++

Pointers

1
// delclaring pointers
2
int* ptr; // default value 0 when printed
3
​
4
int var; // live in an address 0xA, think of it as empty container
5
​
6
int var = 7; // assignment of 7 into the var container
7
​
Copied!
​
    What is a Identity Matrix
    ​
      A square matrix in which all the elements of the principal diagonal are ones and all other elements are zeros. The effect of multiplying a given matrix by an identity matrix is to leave the given matrix unchanged.
    What is a Pointer:
      A variable that stores the memory address as its value. A pointer variable points to a data type (like int or string) of the same type, and is created with the * operator. The address of the variable you're working with is assigned to the pointer: β€” w3schools​
Last modified 5mo ago
Copy link