7.02 Unformatted and Formatted Input Output in C++

Опубликовано: 05 Май 2018
на канале: Darshan University
23,329
274

Unformatted and Formatted input-output functions in C++ with examples and explanation of each and Manipulators for formatted I/O operations.

Learning behaviour of put(), get(), getline(), write() functions.
get() function gets a character from keyboard
put() function can be used to display value of variable ch or character.
getline() reads whole line of text that ends with newline character or up to (size-1).
write() displays string of given size, if the size is greater than the length of line, then it displays the bounds of line.
width(): To specify the required field size for displaying an output value.
precision(): To specify number of digits to be displayed after the decimal point of a float value.
fill(): To specify a character that is used to fill the unused portion of a field.
setf(): To specify format flags that can control the form of output.
unsetf(): To clear the flags specified
Manipulators are special functions that can be included in the I/O statements to alter the format parameters of a stream.
To access manipulators, the file iomanip should be included in the program.
setw(): Set the field width.
setprecision(): Set the floating point precision
setfill(): Set the fill character.
setiosflags(): Set the format flag.
resetiosflags(): Clear the flag specified.
endl: Insert a new line and flush stream.

GTU - Computer Engineering (CE) - Semester 4 - 2140703 - Object Oriented Programming with C++ - Concepts of C++ - Introduction to Object Oriented Programming

Object-Oriented Programming with C++ PPTs are available here: http://www.darshan.ac.in/DIET/CE/GTU-...

This video is recorded by Prof. Rupesh Vaishnav ([email protected], +91-9428037452) at Computer Engineering Department of Darshan Institute of Engineering & Technology, Rajkot as per GTU Syllabus.

Darshan Institute of Engineering & Technology, Rajkot is a leading institute offering undergraduate, graduate and postgraduate programs in engineering. The Institute is affiliated to the Gujarat Technological University (GTU) and approved by the AICTE, New Delhi.

Visit us: http://www.darshan.ac.in
Write us: [email protected]
Facebook:   / darshaninstitute.official  
Twitter:   / darshan_inst  
Instagram:   / darshan_inst