Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 806 Bytes

Array Members.md

File metadata and controls

27 lines (19 loc) · 806 Bytes
  1. length: returns number of elements in array

  2. push(): appends a zero-initialised element at the end of the array and returns a reference to the element

  3. push(x):  appends a given element at the end of the array and returns nothing

  4. pop: removes an element from the end of the array and implicitly calls delete on the removed element


Slide Screenshot

058.jpg


Slide Deck

  • length, push, push(x), pop
  • length -> Number of Elements
  • push -> Zero Element @ End
  • push(x) -> x @ End
  • pop -> Remove Element @ End
  • Security: Length & Off-by-one, push/pop Semantics

References