What is the meaning of the backslash mark

Assignment Help Computer Engineering
Reference no: EM133548630

Exercise 1

Summarize a brief description of the lab project below and outline the objectives of this of the various exercises.

You can organize the subsections according to different parts of the project (e.g. "Exercise 1", "Exercise 2" and so on), and include the problem statement, source code, results, and your observations under each subsection. Discuss the problems you encountered and how you resolved them. Summarize what is achieved in the lab project.

(a). Build a new project and add the following simple C++ program in it. Make sure that you type in the program exactly as shown.

// This is our first C++ program.

#include <iostream>

using namespace std;

int main()

{

couts << " What is your favorite" << endl;

cout << " flavor of ice cream? " << endl;

return 0;

}

(b). Build the project. What do you see in the Output window? Clearly show the error message in your lab report (you need to show error messages for all subsequent exercises, if any).

(c). Go to the line with error, which is indicated in the error message, correct the error by replacing "couts" with "cout". Build the project again and show the results in your lab report.

(d). Remove the semicolon from the end of the line

couts << " What is your favorite" << endl;

Try to compile this altered version. How does your compiler respond?

(e). Correct the error introduced in Step (d), and then remove the closing brace } at the end of the program. Try to compile this altered version. How does your compiler respond? Correct the error and rebuild the program.

Exercise 2

(a). Omit the following lines

#include <iostream>

using namespace std;

from the corrected program in Exercise 1 and try to compile the modified version. Record what happens.

(b). Remove both cout statements (not just the word cout, a statement ends with ;) from the modified program in Step (a) and try to compile the program. Explain the results.

Exercise 3

(a). Remove "<< endl" from the line

cout << " What is your favorite" << endl;

from the corrected program in Exercise 1 and try to compile the modified version. Record what happens and explain what "<< endl" does from your observation.

(b). Now your program is free of error, but it does not show the sentence

"What is your favorite flavor of ice cream?" properly. How do you solve this problem? Record what you did and the new results.

Exercise 4

(a). Replace the procedural part of the function main in Exercise 1 with the following lines, one line at a time. Build the program, if it contains error, record the error message, otherwise record the results. (That means you need to repeat the steps change-> build-> run-> record for four times.)

cout << "Oh, I love to program in C++." << endl;

cout << "Oh, I love to program in "C++"." << endl;

cout << "Oh, I love to program in ""C++""." << endl;

cout << "Oh, I love to program in \"C++\"." << endl;

What rule can you derive about printing sentences containing quotation marks?

(b). What is the meaning of the backslash mark?

Exercise 5

Build a program that prints the message:

My name is Hector; I am a vector.

I am the subject of many Physics lectures!

a). All on one line

(b). On two lines

(c). On two lines and inside a box drawn with asterisks (*).

For these three cases, include your programs and the corresponding outputs in your lab report.

Reference no: EM133548630

Questions Cloud

Employ the craap method to analyze its validity : Find an article on the web: either on social media or by searching a topic. Employ the CRAAP method to analyze its validity. Just work your way through
How private prisons profit from mass incarceration : How private prisons profit from Mass Incarceration? Discuss the difference between federally funded institutions and private institutions?
Discuss potential pros and cons of the effects : Discuss the potential pros and cons of the effects of this intervention on Brittney's intellectual functioning as well as her social functioning.
How the organization communicates their identity in contrast : examine patterns of how the organization communicates their identity in contrast to traditional law enforcement organizations. Also, explain how groups like
What is the meaning of the backslash mark : What is the meaning of the backslash mark - How do you solve this problem? Record what you did and the new results
What factors in the case do you believe are valid for : Summarize the case with the important facts such as who, where, when, what happened, why was self-defense force used, and how did this case conclude.
Outline security operations program activities : Outline security operations program activities and Select three methods to monitor events and detect suspicious activity
Show the various relevant to the crime : Overview photographs are needed to show the various relevant to the crime. Detailed photographs, from a short distance. of injuries such as are taken on site.
How is that concept relevant to it security : how is that concept relevant to IT security? What did you find interesting? What did you get out of my (Instructor) lecture

Reviews

Write a Review

Computer Engineering Questions & Answers

  Create a graph by coloring each test set point orange

Create a graph by coloring each test set point orange or blue based on the predicted value. Also draw the boundary between orange and blue points.

  Prompt the user for an integer value in decimal and convert

Prompt the user for an integer value in decimal and convert the value to it's octal (base 8) equivalent value. Display the result.

  Write a program for policy iteration problem

Write a program for policy iteration and re-solve Jack's car rental problem with the following changes.

  Describe levels of the dgi data governance framework

With this framework in mind that allows for a conceptual look at data governance processes, rules, and people requirements identify and name the 10 levels.

  Discuss the digital benefits of the 5g roll out

Discuss the digital benefits of the 5G roll out in the rural areas of the eastern cape with respect to the national broadband network

  What variety of cable will work to make an association

What variety of cable will work to make an association

  Write paper about cryptography encryption and stream ciphers

ISSC 266- Write a paper about Cryptography, Encryption, Stream Ciphers, Block Ciphers, Public-Key Cryptography, RSA Cryptosystem and Digital Signatures.

  How the open call can be used to emulate the function

Specify how the open call can be used to emulate the function performed by the shell's > and >> symbols.

  Discuss an organizations need for physical security

Discuss an organization's need for physical security. What methods, approaches, and models can be used by organizations when designing physical security needs?

  Give process that occurs between a client and web server

define the process that occurs between a client and Web server by describing the functionality of the OSI reference model. Diagram the interaction between the client and the server and illustrate the data flow.

  What are the main reasons why a vpn is the right solution

What are the main reasons why a VPN is the right solution for protecting the network perimeter? Do they also provide protection for mobile devices? 300 words.

  Construct a regular expression

Construct a regular expression Currency, in dollars, represented as a positive decimal number rounded to the nearest one-hundredth. Such numbers begin

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd