Skip to content

Tag Archives: cpp-input-output

The setw() method of iomanip library in C++ is used to set the ios library field width based on the width specified as the parameter… Read More
The resetiosflags() method of iomanip library in C++ is used to reset the ios library format flags specified as the parameter to this method.Syntax:   resetiosflags… Read More
C++ helps you to format the I/O operations like determining the number of digits to be displayed after the decimal point, specifying number base etc.… Read More
How to input a large number (a number that cannot be stored even in long long int) without spaces? We need this large number in… Read More
The format specifier is used during input and output. It is a way to tell the compiler what type of data is in a variable… Read More
Stringstream is stream class present in C++ which is used for doing operations on a string. It can be used for formatting/parsing/converting a string to… Read More
It is a common practice to use std::endl to print newlines while using cout. For small programs with very little I/O operations this practice is… Read More
In C, we could use the function freopen() to redirect an existing FILE pointer to another stream. The prototype for freopen() is given as  FILE… Read More
kbhit() functionality is basically stand for the Keyboard Hit. This function is deals with keyboard pressing  kbhit() is present in conio.h and used to determine… Read More
Consider a problem where we need to take an unknown number of integer inputs.  A typical solution is to run a loop and stop when… Read More
A buffer flush is the transfer of computer data from a temporary storage area to the computer’s permanent memory. For instance, if we make any… Read More
Given a file “Input.txt” in which every line has values same as instance variables of a class. Read the values into the class’s object and do… Read More
C++ comes with libraries that provide us with many ways for performing input and output. In C++ input and output are performed in the form… Read More
Below is syntax of Scanf. It requires two arguments:  scanf("Format Specifier", Variable Address); Format Specifier: Type of value to expect while input Variable Address: &variable… Read More
Print simple patterns like below using single line of code under loop. Examples: Input : 5 Output : * ** *** **** ***** Input :… Read More

Start Your Coding Journey Now!