HW 5.docx - Cindy Pham HW 5 Multiple Choice 1 C 2 A 3 D 4 B...

This preview shows 1 out of 3 pages.

Cindy Pham HW 5 Multiple Choice 1. C 2. A 3. D 4. B 5. A 6. D 7. B 8. C 9. A 10. B 11. D 12. B 13. B 14. B 15. A 16. D 17. D 18. B 19. C 20. C True or False 1. False 2. True 3. False 4. False 5. False 6. True 7. False 8. False 9. True 10. False 11. True 12. False 13. True 14. True 15. True
Image of page 1

Subscribe to view the full document.

Cindy Pham Short Answer 1. A function can do a specific task and every time in the program you need to carry out that task, you can call the function instead of rewriting it each time. 2. In a function definition, there is the function header and the block. The function header begins a function and includes the function name. The block is a set of statements that is executed whenever the function is called in the program. 3. When a function is executing and the end of the function block is reached, the program will jump back to after the function was called. 4. A local variable is a variable that is assigned within a function. Only the statements inside that function will be able to access the variable.
Image of page 2
Image of page 3
You've reached the end of this preview.
  • Summer '14
  • Global variable, static variable

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern