Flashcards
Comp 1633 MidTerm Review
Flashcards do conjunto (24)
- 1What does Testing involve(two things)?1. Verification
2. Validation - 2What is Testing for?The process of detecting bugs in code and evaluating the logic errors
- 3What are four basic constructs from which all programs are built?1. simple statements in sequence
2. selection contructs
3. repetition constructs
4. invocation - 4what is Exhaustive Testing?Try every possible input combination
- 5Black box analysis ?a form of functional testing
- 6White Box analysis ?a form of structural testing
- 7What is Module ?a functional unit of code
e.g. a function
or
a .cpp module
or
a class - 8Modular Testing ?testing each module as you go
(i.e. test small pieces at a time) - 9What is a stub ?a "dummy" function
- 10What is a test driver ?a program which tests modules by invoking them in many different ways with many different test data.
a "dummy" main program - 11Issues with One‐File Programs1. file length becomes large
2. difficult to edit
3.potential of code loss
4. only 1 programmer may work on it at once - 12Advantages of Multi‐File Programs1. keeps each module a manageable size
2. modules can be edited and tested separately - 13Why are header guards included?To prevent from multiple declarations
- 14Types of Input Error ?1. Input of legal format, but out of range for the application
2. No input
3. Input not of legal format - 15Pros of dynamic data ?Dynamic data can expand and shrink as needed
- 16Size of int?4 bytes
- 17Size of char?1 byte
- 18Size of double?8 bytes
- 19What kind of values do pointers hold?A memory address
- 20What is a pointer variable?a variable which can contain a memory address
- 21int num = 1; int *ptr; ptr = # What does "&" do?Gives the address of the variable
- 22int num = 1; int *ptr; *ptr = num; What does "*" do?Evaluate the contents of the address
- 23___ = new Node; What does "new" do?new gets memory space of the appropriate type and returns a pointer to the dynamic variable
- 24delete Ptr; What does delete do?Allocated memory is returned to the heap
Informações
- Descrição
- 1 Computer Science FlashCards sobre Comp 1633 MidTerm Review, criado por Arsh Dhillon em 28-02-2016.
- Criado por
- Arsh Dhillon
- Visualizações
- 1
- Avaliação