Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Escape sequence \f - form feed - what exactly is it?

Tags:

c++

escaping

\f is said to be the form feed. \t is a tab, \a is a beep, \n is a newline. What exactly is a form feed - \f? The following program

#include <iostream> int main() {    std::cout << "hello\fgoodbye" << std::endl;   } 

prints hello then a female sign (an upside down holy hand grenade:) and then goodbye all on one line.

like image 945
Armen Tsirunyan Avatar asked Dec 02 '10 11:12

Armen Tsirunyan


People also ask

What is \f form feed?

Sometimes abbreviated as FF, form feed is a button or command on the printer that allows the advancement of a printer page. This feature was frequently used on dot matrix printers since nearly all of them used continuous feed paper rather than single sheets.

What is form feed escape sequence in C?

10. Form Feed(\f) in C. This escape sequence is used for a form feed. Example:- Form Feed. #include <stdio.h>


1 Answers

It skips to the start of the next page. (Applies mostly to terminals where the output device is a printer rather than a VDU.)

like image 134
CB Bailey Avatar answered Sep 28 '22 02:09

CB Bailey