Question: I Want Code C++ and screenshot outputs Write 14 C++ statements that 1. Declare a string variable named color. 2. Initialize the color variable to

I Want Code C++ and screenshot outputs

Write 14 C++ statements that 1. Declare a string variable named color. 2. Initialize the color variable to the value Red. 3. Declare two pointer variables named pointer1 and pointer2 to be used with color. i. Using only one statement. 4. Initialize pointer1 to point to color using the color variable. 5. Initialize pointer2 to point to color using the pointer1 variable. 6. Modify the value of color to Green using pointer2. 7. Print the memory address of color (not the value stored). 8. Print the value of pointer1. 9. Print the value of pointer2. 10. Print the value of color. 11. Print the value pointed to by pointer1 using pointer1. 12. Print the value pointed to by pointer2 using pointer2. 13. Print the memory address of pointer1 (not the value stored). 14. Print the memory address of pointer2 (not the value stored)

___________

Write a full C++ program that takes 2 inputs from the user. The first is a number that is stored in variable of type double. The second is a string names inputString. Then use predefined function to do the following a. Output the results of b. Output the result of c. Output the result of d. Output the result of + e. Check if inputString is not empty using the appropriate class member function then make it empty using another member function. f. Print the now empty inputString

___________

Write a full C++ program that defines and uses the function printSum to print the sum of numbers from 1 to n. the value of n is taken from the user as input.

__________

Write a full C++ program that uses the void function getUserInput to return two user inputs of type integer (int)

_________

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!