User Tools

Site Tools


cplusplus:pointers_3_slides

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
cplusplus:pointers_3_slides [2021/10/24 02:43] – [Pointer arithmetic] mithatcplusplus:pointers_3_slides [2021/10/24 02:46] (current) – [Pointer arithmetic: addition] mithat
Line 6: Line 6:
 Pointers, arrays, arithmetic.\\ Pointers, arrays, arithmetic.\\
 Mithat Konar\\ Mithat Konar\\
-March 312019+October 232021
  
 ===== Pointers and arrays ===== ===== Pointers and arrays =====
Line 54: Line 54:
   * ''+'',  ''+='', ''-'', ''-='', ''++'', ''--'' do math in terms of the size of the pointed data type.   * ''+'',  ''+='', ''-'', ''-='', ''++'', ''--'' do math in terms of the size of the pointed data type.
   * E.g., adding 1 to a pointer makes it point to the next block of memory corresponding to the size of the underlying type.   * E.g., adding 1 to a pointer makes it point to the next block of memory corresponding to the size of the underlying type.
- 
-===== Pointer arithmetic: addition ===== 
-  * Adding 1 to a pointer makes it point to the next block of memory corresponding to the size of the underlying type. 
  
  
Line 82: Line 79:
 </file> </file>
  
-===== Pointer arithmetic: subtraction =====+===== Pointer arithmetic: pointer difference =====
  
 Subtracting one pointer from another returns the number of elements between two addresses: Subtracting one pointer from another returns the number of elements between two addresses:
cplusplus/pointers_3_slides.1635043425.txt.gz · Last modified: 2021/10/24 02:43 by mithat

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki