Thursday, March 25, 2010

Module 5 - "Fun"ctions

Read Module 5!

Answer the following 2 Critical Checks:

1. When a function is called, what happens to program execution?
2. What is the difference between an argument and a parameter?
3. If a function requires a parameter, where is it declared?

1. Show the two forms of the return statement.
2. Can a void function return a value?
3. Can a function call be part of an expression?


.

Tuesday, March 23, 2010

Temperature Unit Conversions

Lookie Here

Write a c++ program which converts:
  • Fahrenheit to Celsius
  • Celsius to Fahrenheit
  • Fahrenheit to Kelvin
  • Kelvin to Fahrenheit
  • Kelvin to Celsius
  • Celsius to Kelvin

.

Monday, March 22, 2010

HW

Module 4 Mastery Check
1. Show how to declare a short int array called hightemps that is 31 elements long.

2. In C++, all arrays begin indexing at ________.

3. Write a program that searches an array of ten integers for duplicate values. Have the program display each duplicate found.

4. What is a null-terminated string?

6. When using strcat( ), how large must the recipient array be?

7. In a multidimensional array, how is each index specified?

8. Show how to initialize an int array called nums with the values 5, 66, and 88.

9. What is the principal advantage of an unsized array declaration?

10. What is a pointer? What are the two pointer operators?

11. Can a pointer be indexed like an array? Can an array be accessed through a pointer?

13. What is it called when one pointer points to another pointer?

14. Of what significance is a null pointer in C++?