answersLogoWhite

0


Best Answer

An input stream is a character sequence device or buffer from which input can be gathered. The standard input stream is usually a keyboard, data file or the output stream from another program. The user of the program can normally decide where standard input may be redirected from when launching the program, typically defaulting to the keyboard.

User Avatar

Wiki User

9y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is meant by input stream?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What is the standard stream that you read input from?

The standard console input stream, std::cin.


What stream perform conversion on another stream?

input


What are the functions of lexical analyzer?

The lexical analyzer function, named after rule declarations, recognizes tokens from the input stream and returns them to the parser.


What are input output streams in c plus plus?

The term stream is a generic abstraction that says nothing about the implementation. However, if we use the analogy that gave it its name, a stream of water, we can better understand how a stream works. A water stream allows water to flow from one point to another in one direction only (downstream, with the flow of the current). If we were to throw a stick into the water, it would be carried downstream by the water where it could then be extracted. Sticks can be inserted or extracted automatically by devices, thus allowing information to pass between those devices.A file stream is a stream that is associated with a device representing a file. If the file is upstream then we can use the stream to extract information from the file. When we extract information from a stream, that stream is known as an input stream; it provides us with information. Conversely, if the file were downstream then we can use the stream to insert information into the file. When we insert information into a stream, that stream is known as an output stream; it carries information away from us.An input/output stream is one where we can both insert and extract information. An input/output file stream is a typical example: we can extract data from the file associated with the stream, process the data (modify it in some way), and then insert the modified data back into the same file. To implement an input/output stream, we simply use two streams associated with the same device: one specifically for input operations, the other specifically for output operations. This implementation detail is hidden from the user, so the stream appears to be a bi-directional stream as far as the user is concerned.


How to write a C plus plus Program to convert a string into an integer?

std::string input = ""; std::getline (std::cin, input); // get input from stdin std::stringstream ss (input); // place input in a string stream integer num = 0; if (ss >> num) // extract integer from string stream { // Success! } else { // Fail! }

Related questions

What is the standard stream that you read input from?

The standard console input stream, std::cin.


What stream perform conversion on another stream?

input


Purpose of getch?

The purpose of getch() is to input a single character from the input stream.


What is meant by 'verification of data'?

It is the checking of data input to a system to ensure that it is what is meant to have been input.


What are the functions of lexical analyzer?

The lexical analyzer function, named after rule declarations, recognizes tokens from the input stream and returns them to the parser.


What are input output streams in c plus plus?

The term stream is a generic abstraction that says nothing about the implementation. However, if we use the analogy that gave it its name, a stream of water, we can better understand how a stream works. A water stream allows water to flow from one point to another in one direction only (downstream, with the flow of the current). If we were to throw a stick into the water, it would be carried downstream by the water where it could then be extracted. Sticks can be inserted or extracted automatically by devices, thus allowing information to pass between those devices.A file stream is a stream that is associated with a device representing a file. If the file is upstream then we can use the stream to extract information from the file. When we extract information from a stream, that stream is known as an input stream; it provides us with information. Conversely, if the file were downstream then we can use the stream to insert information into the file. When we insert information into a stream, that stream is known as an output stream; it carries information away from us.An input/output stream is one where we can both insert and extract information. An input/output file stream is a typical example: we can extract data from the file associated with the stream, process the data (modify it in some way), and then insert the modified data back into the same file. To implement an input/output stream, we simply use two streams associated with the same device: one specifically for input operations, the other specifically for output operations. This implementation detail is hidden from the user, so the stream appears to be a bi-directional stream as far as the user is concerned.


How to write a C plus plus Program to convert a string into an integer?

std::string input = ""; std::getline (std::cin, input); // get input from stdin std::stringstream ss (input); // place input in a string stream integer num = 0; if (ss >> num) // extract integer from string stream { // Success! } else { // Fail! }


What is meant by the following statement A repeater is limited not only in function but also in scope?

A repeater contains one input port and one output port, so it is capable only of receiving and repeating a data stream.


What is the input statement for a program?

Input statements extract data from an input stream. For example: int x; std::cin >> x; Output statements insert data to an output stream. For example: std::cout << x; You cannot insert data into an input stream and cannot extract data from an output stream. However, streams that are both input and output streams (such as read-write files) can insert and extract data as required, depending on whether you are reading or writing to the stream.


What you meant by yacc tool in compiler design?

Yacc provides a general tool for imposing structure on the input to a computer program. The Yacc user prepares a specification of the input process; this includes rules describing the input structure, code to be invoked when these rules are recognized, and a low-level routine to do the basic input. Yacc then generates a function to control the input process. This function, called a parser, calls the user-supplied low-level input routine (the lexical analyzer) to pick up the basic items (called tokens) from the input stream.


What is the use of printf and scanf function?

Printf prints something to the standard output stream, and scanf inputs something from the standard input stream.


Definition of recycle and purge stream?

Recycle stream is a process in which a portion of the output stream is returned to the input stream for further processing. Purge stream is the removal of a portion of the output stream to prevent accumulation of impurities or by-products in the system.