What does '\r' and '\b' mean? Please explain with example.

Answer Posted / ankita

\r is known as carriage return
e.g printf("ABC\rDE");
ABC.
then becoz of \r cursor comes back to the 1st char i.e here
A after that DE is there then finally it print
DEC with cursor on C.
\b is known as back literal
e.g. printf("ABC\bDE");
then ABC then finally ABDE will get printed.

Is This Answer Correct ?    63 Yes 27 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is #include sstream?

620


Is swift faster than go?

609


what is pre-processor in C++?

591


Is c++ double?

557


What are the defining traits of an object-oriented language?

690






Is c++ free?

577


Write a note about the virtual member function?

597


What are the 2 main types of data structures?

582


What is format for defining a structure?

582


What is the C-style character string?

600


What is encapsulation in C++? Give an example.

582


What is the operator in c++?

622


Define Virtual function in C++.

619


What is algorithm in c++ programming?

585


What is a singleton class c++?

540