Review Exercise s
-
Write
the C++ code to store your weight, height (in feet), shoe size, and name with four variables. Declare the vari- ables, then assign their values in the body of your program.
-
Rewrite
the program in Exercise 1, adding proper pr i ntf () statements to print the values. Use appropriate messages (by printing string literals) to describe the printed values.
-
Write
a program to store and print the names of your two favorite television programs. Store these programs in two character arrays. Initialize one of the strings (assign it the first program’s name) at the time you declare the array. Initialize the second value in the body of the program with the st r cpy() function.
-
Write a program that puts 10 different initials in 10 elements of a
single character array. Do not store a null zero. Print the list backward, one initial on each line.