Answer the following questions.

  • What is the difference between a compile error and a run time error? Provide examples of both types of errors.
  • Explain the meaning of the reserved word fixed(available if the library < iomanip > is included.
  • Explain the difference between the valid statements a = 2 and a == 2 .
  • Explain the difference between string and char .

Write a single coutstatement that produces the output below. The first question is solved for you as an example.

Ho la
cout << "Hon" << "la"
El Chavo <3 tortas,
<3 = 'loves'
nnnn
cout << "El chavo del " << 8

What is the output of the following snippets?

string s="2"
int a=2
cout << s + s << " 2 + 2" << a+a
cout << setprecision(2)
cout << 4/3 << " times " << 3.0/4 << " = 1?"
cout << "\"n//""

Write the missing code (in the snippet below) to produce the graphics on the right.

  • The outside frame is just given for reference.
  • You are free to choose the radius of the circle.
#include "ccc_win.h"
int ccc_win_main(){
return 0;
}

Write a fullprogram(startingfrom #include) that reads two integers from the console and outputs (to the console as well) the sum, the product and the average.

Write a full program (starting from #include ) that reads from the user an integer between 10 and 99 and displays the following messages depending on the input.

  • The first digit is strictly less than the second digit.
  • The second digit is strictly less than the first digit.
  • The two digits are equal.

Write a full program that reads 2 strings from the user and exchanges the last character of the first word and the first character of the second word. For example, if the user enters the words:

Don Ramon

the program then displays:

DoR namon
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.