Tag Archives: cpp-input-output

There are two methods in which input can be taken in a more secure way: Do not display any content. Display a special character such… Read More
Given an integer N in form of string str consisting of more than 100 digits, the task is to store the value for performing an… Read More
Formatting in C: In C language format specifiers are used to input and output. It is a way to tell the compiler what type of… Read More
The task is to write a program to print Hello World without using main() and semicolon. As we already know how to print Hello World… Read More
The setbase() method of iomaip library in C++ is used to set the ios library basefield flag based on the argument specified as the parameter… Read More
The setprecision() method of iomaip library in C++ is used to set the ios library floating point precision based on the precision specified as the… Read More
The () method of iomaip library in C++ is used to set the ios library format flags specified as the parameter to this method. Syntax:… Read More
The setfill() method of iomaip library in C++ is used to set the ios library fill character based on the character specified as the parameter… Read More
The setw() method of iomaip 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 iomaip library in C++ is used to reset the ios library format flags specified as the parameter to this method. Syntax:… 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