C++ How to Program (10th Edition)
C++ How to Program (10th Edition)
10th Edition
ISBN: 9780134448237
Author: Paul J. Deitel, Harvey Deitel
Publisher: PEARSON
bartleby

Concept explainers

bartleby

Videos

Textbook Question
Book Icon
Chapter 2, Problem 2.7E

Discuss the meaning of each of the following objects:
a) std: :cin
b) std: : cout

(a)

Expert Solution
Check Mark
To determine

To discuss the meaning of std::cin.

Explanation of Solution

cin is an object which is used to read the data from input devices in a C++ program. Here, std is the standard I/O reader. It needs “iostream” header file to be included with preprocessor as #include<iostream>.std::cin is normally connected to the keyboard to input data. Data is inputted by a concatenating stream extraction operator (>gt;).

So, std::cin is used to read input from the user.

(b)

Expert Solution
Check Mark
To determine

To discuss the meaning of std::cout.

Explanation of Solution

cout is an object which is used to write the output to the console in a C++ program. Here, std is the standard I/O reader. It needs “iostream” header file to be included with preprocessor as #include<iostream>.std::cout is normally connected to screen to output the data.std::cout indicates that the cout is used from “namespace ” std. Data is outputted by a concatenating stream insertion operator (<<).

So,std::cout will send the stream of characters to the standard output stream object.

Want to see more full solutions like this?

Subscribe now to access step-by-step solutions to millions of textbook problems written by subject matter experts!
Students have asked these similar questions
C# (Shape Hierarchy) Implement the Shape hierarchy of. Omit the Triangle and Tetrahedron classes. Each TwoDimensionalShape should contain read-only abstract property Area to calculate the area of the two-dimensional shape. Each ThreeDimensionalShape should have read-only abstract properties Area and Volume to calculate the surface.area and volume, respectively, of the three-dimensional shape. Create an app that uses an array of Shape references to objects of each concrete class in the hierarchy. Display a text description of the object to which each array element refers. Also, in the loop that processes all the shapes in the array, determine whether each shape is a TwoDimensionalShape or a ThreeDimensionalShape. If a shape is a TwoDimensionalShape, display its area. If a shape is a ThreeDimensionalShape, display its area and volume.
Don't reject my question under complex one Computer Science Create a Windows Form Application project. with C#, using random values in an array or loop. The application should have a button and a picture box. Each time the button is clicked, a random number 1 through 6 is generated and the corresponding die image is displayed in the picture box.
Language : C Jojo remembered going to a cave with his best friend Lili before the coronavirus pandemic.There, he saw several Stalactites hanging from the /cave’s ceiling. Stalactite is a type offormation that hangs from the ceiling of caves.Jojo noticed an interesting fact about the stalactites. The stalactite formation in thiscave forms a pattern. He wonders how will the formation look like if the cave is of adifferent size. He has asked your help to visualize this formation. Format Input :A single line with an integer N denoting the size of the cave Format Output :A size N formation of stalactites. Do not print extra spaces behind the last ‘*’ character in each line. Constraints : • 1 ≤ N ≤ 12 Sample Input 1 :2 Sample Output 1*** *Sample Input 2 :3  Sample Output 2 :******* *  *  *    *

Chapter 2 Solutions

C++ How to Program (10th Edition)

Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
9.1: What is an Array? - Processing Tutorial; Author: The Coding Train;https://www.youtube.com/watch?v=NptnmWvkbTw;License: Standard Youtube License