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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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