Joke Collection Website - News headlines - A pointer in a programming language is a cursor?
A pointer in a programming language is a cursor?
In a computer, all data is stored in memory. Generally speaking, a byte in memory is called a memory cell, and the number of memory cells occupied by different data types is different, for example, integers account for 2 cells and characters account for 1 cell. In order to access these memory cells correctly, each memory cell must be numbered. According to the number of the storage unit, the storage unit can be found accurately. The number of the storage unit is also called the address. Because the required memory cell can be found according to its number or address, this address is usually called a pointer. The pointer of a storage unit and the content of a storage unit are two different concepts. A popular example can be used to illustrate the relationship between them. When we go to the bank to deposit and withdraw money, the bank staff will look for our deposit slip according to our account number, and write down the deposit amount on the deposit slip after finding it. Here the account number is the pointer to the certificate of deposit, and the deposit number is the content of the certificate of deposit. For a memory cell, the address of the cell is a pointer, and the data stored in it is the content of the cell. In C language, a variable is allowed to store a pointer, which is called a pointer variable. Therefore, the value of the pointer variable is the address of the storage unit or a pointer to the storage unit.
- Previous article:What should I do if I receive fake money?
- Next article:The meaning of persuasion
- Related articles
- Safety slogans for safe use of electricity
- E-commerce online retail advertising language
- Yongmei's poetics of divination operators
- The slogan of buying nectarines
- Is the TCC of heating network a pyramid scheme?
- Which painting did the green inspiration come from?
- The grass is green and you can¡¯t bear to step on it. What does it mean?
- Beautiful sentences of strawberries
- Famous sayings of reading for the rise of China
- Handan tourism slogan