O GoConqr está de visual novo! Conte para nós o que você achou.

Flashcards

COMP 206 Unit 4: Data Abstraction

Adriana Vincelli-Joma COMP 206 University-level C++ Inglês 24 flashcards

Flashcards do conjunto (24)

  1. 1CStashprogramming tool that acts like an array but whose size can be established at runtime
  2. 2dynamic storage allocation-performing memory allocation manually by programmer
    -allocated on heap
    -allocate memory as program executes
  3. 3C Dynamic Storage keywords-malloc()
    -calloc()
    -realloc()
    -free()
  4. 4malloc()-allocates block of memory to heap
    -returns pointer
    -takes single argument and doesn't automatically set storage area to 0
    -allocates contiguous space of size bytes
  5. 5calloc()-allocates requested memory
    -takes two arguments that specify number of elements to be reserved, and size of each element in bytes
    -returns pointer to beginning of allocated storage area
    -storage area automatically set to 0
  6. 6realloc()-changes size of previously allocated block to size bytes
    -returns pointer to new block
  7. 7free()-returns block of memory pointed to by pointer that was previously allocated by calloc(), malloc(), or realloc() call
  8. 8C++ Dynamic Storage Keywords-new
    -delete
  9. 9new-allocates storage for variables and returns pointer
    -invokes object's default constructor
    -create new things out of heap
  10. 10delete-complement of new
    -applied to release any storage that is allocated with new
    -return memory to heap
    -takes pointer to object to be destroyed
  11. 11object-variable
    -region of storage
    -place where you can store data
    -operations can be performed on this data
  12. 12encapsulationability to package data with functions
  13. 13abstract data typeallows us to abstract concept from problem space to solution space
  14. 14C++ Object-sovereign entity that can perform some task
    -must have unique address
  15. 15C++ Struct-structured piece of data
    -has some address as object created directly after them
  16. 16object's interface-declaration
    -allows computer to enforce certain properties on object
  17. 17object's implementation-definition of member functions
  18. 18header file-tells compiler what is available in library
    -where interface specification is stored
    -used to hold all declarations for functions
  19. 19#defineused to create compile time flags
  20. 20#ifdef-tests label to see if it has been defined
    -if true, code following will be included in package sent to compiler
  21. 21#endifstops inclusion
  22. 22push()takes pointer to data you wish to store
  23. 23pop()returns data pointer from top of stack and removes top element
  24. 24peek()returns data pointer from top element, but leaves top element on stack

Informações

Descrição
University-level C++ COMP 206 FlashCards sobre COMP 206 Unit 4: Data Abstraction, criado por Adriana Vincelli-Joma em 08-09-2021.
Visualizações
1
Avaliação

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?