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
Rest of code in image / This is a bad programming style since it is using goto.  // This is an spagetti code and not working.// Use function to display  menu, and display game rules,// Use different color for text display.// fix it so it works any way you like./*HANDLE screen = GetStdHandle(STD_OUTPUT_HANDLE);    // Write 16 lines in 16 different colors.    for (int color = 0; color < 16; color++)    {        SetConsoleTextAttribute (screen, color);        cout << " Hello World!" << endl;        Sleep(400);   // Pause between lines to watch them appear    }    // Restore the normal text color)    SetConsoleTextAttribute(screen, 7);*/#include <iostream>#include <windows.h>using namespace std;int  main(){    //textbackground(WHITE);    //textcolor(RED);    system("cls");    char ch, a[20], ch2;    int num = 100, rnum, guess, count, ch1, c = 0;    cout << "**********************************************************"<<endl;    cout << "*…
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