Category: C++

Given the declaration of a structure whose tag is DATE write the declaration of the following variables enrolled_on, paid_on, and completed_on, each of which is of type DATE.

Given the declaration of a structure whose tag is DATE write the declaration of the following variables enrolled_on, paid_on, and completed_on, each of which is of type DATE.

LANGUAGE: C++ CHALLENGE: Given the declaration of a structure whose tag is DATE write the declaration of the following variables enrolled_on, paid_on, and completed_on, each of which is of type DATE....

This content requires that you purchase additional access. The price is $2.99 or free for our Make Life Easier and 30 Days - Not Recurring members.

Purchase this Content ($2.99) Choose a Membership Level

Read More

Assume that x is a variable that has been declared as an int and been given a value.

Assume that x is a variable that has been declared as an int and been given a value.

LANGUAGE: C++ CHALLENGE: Assume that x is a variable that has been declared as an int and been given a value. Assume that twice is a function that receives a single integer parameter and returns twice its value. (So if you pass 7 to twice it will return 14. Thus the expression twice(7) has the...

This content requires that you purchase additional access. The price is $2.99 or free for our Make Life Easier and 30 Days - Not Recurring members.

Purchase this Content ($2.99) Choose a Membership Level

Read More

Assume the availability of a function named oneMore. This function receives an integer and returns one more than its parameter. So, pass oneMore(12 ) and it will return 13.

Assume the availability of a function named oneMore. This function receives an integer and returns one more than its parameter. So, pass oneMore(12 ) and it will return 13.

LANGUAGE: C++ CHALLENGE: Assume the availability of a function named oneMore. This function receives an integer and returns one more than its parameter. So, pass oneMore(12 ) and it will return 13. DO NOT DEFINE this function– just assume it is available. YOUR TASK: write an expression whose value is 5 but in your expression you can...

This content requires that you purchase additional access. The price is $2.99 or free for our Make Life Easier and 30 Days - Not Recurring members.

Purchase this Content ($2.99) Choose a Membership Level

Read More

Write a for loop that prints the integers 1 through 40, separated by spaces or new lines. You may use only one variable, count which has already been declared as an integer.

Write a for loop that prints the integers 1 through 40, separated by spaces or new lines. You may use only one variable, count which has already been declared as an integer.

LANGUAGE: C++ CHALLENGE: Write a for loop that prints the integers 1 through 40, separated by spaces or new lines. You may use only one variable, count which has already been declared as an integer....

This content requires that you purchase additional access. The price is $2.99 or free for our Make Life Easier and 30 Days - Not Recurring members.

Purchase this Content ($2.99) Choose a Membership Level

Read More

Assume that two parallel arrays have been declared and initialized: healthOption an array of type char that contains letter codes for different healthcare options and annualCost an array of type int.

Assume that two parallel arrays have been declared and initialized: healthOption an array of type  char that contains letter codes for different healthcare options and annualCost an array of type int.

LANGUAGE: C++ CHALLENGE: Assume that two parallel arrays have been declared and initialized: healthOption an array of type char that contains letter codes for different healthcare options and annualCost an array of type int. The i-th element of annualCost indicates the annual cost of the i-th element of healthOption. In addition, there is an char...

This content requires that you purchase additional access. The price is $2.99 or free for our Make Life Easier and 30 Days - Not Recurring members.

Purchase this Content ($2.99) Choose a Membership Level

Read More

Write the definition of a function named fscopy that does a line-by-line copy from one stream to another.

Write the definition of a function named fscopy that does a line-by-line copy from one stream to another.

LANGUAGE: C++ CHALLENGE: Write the definition of a function named fscopy that does a line-by-line copy from one stream to another. This function can be safely passed two fstream objects, one opened for reading, the other for writing. In addition, it gets a bool argument that is true if the output lines are to be...

This content requires that you purchase additional access. The price is $2.99 or free for our Make Life Easier and 30 Days - Not Recurring members.

Purchase this Content ($2.99) Choose a Membership Level

Read More

Project 18: Broken Keypad. The keypad on your oven is used to enter the desired baking temperature and is arranged like the digits on a phone

Project 18: Broken Keypad. The keypad on your oven is used to enter the desired baking temperature and is arranged like the digits on a phone

LANGUAGE: Java CHALLENGE: Project 18: Broken Keypad. The keypad on your oven is used to enter the desired baking temperature and is arranged like the digits on a phone: 123 456 789 0 Unfortunately the circuitry is damaged and the digits in the leftmost column no longer function. In other words, the digits 1, 4,...

This content requires that you purchase additional access. The price is $2.99 or free for our Make Life Easier and 30 Days - Not Recurring members.

Purchase this Content ($2.99) Choose a Membership Level

Read More

Consider this data sequence: “3 11 5 5 5 2 4 6 6 7 3 -8”. Any value that is the same as the immediately preceding value is considered a CONSECUTIVE DUPLICATE.

Consider this data sequence: “3 11 5 5 5 2 4 6 6 7 3 -8”. Any value that is the same as the immediately preceding value is considered a CONSECUTIVE DUPLICATE.

LANGUAGE: Java CHALLENGE: Consider this data sequence: “3 11 5 5 5 2 4 6 6 7 3 -8”. Any value that is the same as the immediately preceding value is considered a CONSECUTIVE DUPLICATE. In this example, there are three such consecutive duplicates: the 2nd and 3rd 5s and the second 6. Note that...

This content requires that you purchase additional access. The price is $2.99 or free for our Make Life Easier and 30 Days - Not Recurring members.

Purchase this Content ($2.99) Choose a Membership Level

Read More

Declare an fstream object named a_log. Using a_log, check if the file activityLog exists. If the file activityLog does not already exist, open it for writing using a_log; otherwise open the file activityLog2 for writing using a_log.

Declare an fstream object named a_log. Using a_log, check if the file activityLog exists. If the file activityLog does not already exist, open it for writing using a_log; otherwise open the file activityLog2 for writing using a_log.

LANGUAGE: C++ CHALLENGE: Declare an fstream object named a_log. Using a_log, check if the file activityLog exists. If the file activityLog does not already exist, open it for writing using a_log; otherwise open the file activityLog2 for writing using a_log....

This content requires that you purchase additional access. The price is $2.99 or free for our Make Life Easier and 30 Days - Not Recurring members.

Purchase this Content ($2.99) Choose a Membership Level

Read More

Write the definition of a function square, which receives an integer parameter and returns the square of the value of the parameter.

Write the definition of a function square, which receives an integer parameter and returns the square of the value of the parameter.

LANGUAGE: C++ CHALLENGE: Write the definition of a function square, which receives an integer parameter and returns the square of the value of the parameter. So if the parameter ‘s value is 7, the function returns the value 49. If the parameter ‘s value happens to be 25, the functions returns the value 625. If...

This content requires that you purchase additional access. The price is $2.99 or free for our Make Life Easier and 30 Days - Not Recurring members.

Purchase this Content ($2.99) Choose a Membership Level

Read More

Write the definition of a function half, which receives an integer parameter and returns an integer that is half the value of the parameter.

Write the definition of a function half, which receives an integer parameter and returns an integer that is half the value  of the parameter.

LANGUAGE: C++ CHALLENGE: Write the definition of a function half, which receives an integer parameter and returns an integer that is half the value of the parameter. (Use integer division!) So if the parameter’s value is 7, the function returns the value 3. If the parameter’s value happens to be 44, the functions returns the...

This content requires that you purchase additional access. The price is $2.99 or free for our Make Life Easier and 30 Days - Not Recurring members.

Purchase this Content ($2.99) Choose a Membership Level

Read More