Write the C++ statements to declare and approprately initialize variables representing the following:1. Your name2. Your age3. Your income

What will be an ideal response?


Answers will vary by student, but the same data types should be used.

1. string myName = "Diane Zak";

2. short age = 21;
    short would be used instead of the int data type, since the maximum value for short
    is 32,767

3. float income = 0.0;
    float would be used instead of the double data type, since the maximum value for float
    is quite large

Computer Science & Information Technology

You might also like to view...

The SOW does not include the criteria that will be used to determine whether the change was successful.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

A NIC can be set up to retrieve any data packet being transferred throughout the Ethernet network segment. This mode is known as _________________________.?

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

Pressing the ____ key deletes the character to the left of the insertion point.

A. Enter B. Tab C. Backspace D. Delete

Computer Science & Information Technology

The sort in which the smallest element from the unsorted sublist is swapped with the element at the beginning of the unsorted sublist is:

A. selection sort B. bubble sort C. insertion sort D. exchange sort E. binary sort

Computer Science & Information Technology