"\n" for new line "\b" for a backspace, means if u print it, cursor will print and come back 1 character. For example.... cout<<"hello\bHi"; will print "HellHi". because after printing Hello, compiler found a \b escape sequence. so it came 1 character back (at 'o' of Hello) and stat printing Hi from o of Hello..... so u got HellHi instead of HelloHi. · '\r' is used for carriage return to come 1 line back or in start of line. · HOPE I FIXED. MARK THIS THREAD SOLVED AND DO RATE ME Answer from warbird43 on daniweb.com
Top answer
1 of 6
4
"\n" for new line "\b" for a backspace, means if u print it, cursor will print and come back 1 character. For example.... cout<<"hello\bHi"; will print "HellHi". because after printing Hello, compiler found a \b escape sequence. so it came 1 character back (at 'o' of Hello) and stat printing Hi from o of Hello..... so u got HellHi instead of HelloHi. · '\r' is used for carriage return to come 1 line back or in start of line. · HOPE I FIXED. MARK THIS THREAD SOLVED AND DO RATE ME
2 of 6
0
Post by jonsca and tux4life have divulged all the information related to this topic.But would like to add some from my side. · Apart from the printable characters (character which can be seen on a output screen) we make use of several other operations when working on any text. When we work on a text editor,the text editor handles all the operations on its own and keeps us away from implementation details.But in C those operations are included in the character set itself so that a user can make use of them and format his/her output in any way required. · These characters which hold a very special meaning and work instead of functions as in text editors are your "Escape Characters". · Every letter has its identity. Say character 'A' instructs the machine to store value of 65 in 1 byte to symbolise 'A'. In escape characters we tell the compiler to escape or neglect the meaning of original character and act differently by placing the '\' symbol before it.Hence the name "Escape Character". You can try something like: · cout << "TestString1__TestString2"; · and place '\a' '\b' '\c' ... and so on and test what every character does.
Discussions

c - what's the differences between r and rb in fopen - Stack Overflow
By clicking “Sign up”, you agree to our terms of service and acknowledge you have read our privacy policy. ... Stack Internal Implement a knowledge platform layer to power your enterprise and AI tools. More on stackoverflow.com
🌐 stackoverflow.com
c - What is the difference between "rb+" and "ab" in fopen()? - Stack Overflow
Stack Internal Implement a knowledge platform layer to power your enterprise and AI tools. Stack Data Licensing Get access to top-class technical expertise with trusted & attributed content. Stack Ads Connect your brand to the world’s most trusted technologist communities. Releases Keep ... More on stackoverflow.com
🌐 stackoverflow.com
What exactly is \r in C language? - Stack Overflow
Stack Internal Implement a knowledge platform layer to power your enterprise and AI tools. Stack Data Licensing Get access to top-class technical expertise with trusted & attributed content. Stack Ads Connect your brand to the world’s most trusted technologist communities. Releases Keep ... More on stackoverflow.com
🌐 stackoverflow.com
What exactly is \r in the C language?
When encountered in a string or character literal, \r represents the carriage return character. In the context of output, \r moves the cursor to the beginning of the current line without advancing to the next line. This means that subsequent characters will overwrite the existing content on ... More on urbanpro.com
🌐 urbanpro.com
4
0
April 15, 2025
🌐
Reddit
reddit.com › r/c_programming › what is the difference between r,. rb, w, wb.. file modes in c
r/C_Programming on Reddit: What is the difference between r,. rb, w, wb.. file modes in C
August 28, 2019 -

I am new to file handling and I don't understand how the file modes work. Any help would be appreciated . Thanks in advance :D

Top answer
1 of 3
9
This is a good chance for you to learn how to read the documentation. Nearly everything about C is extensively documented and if you are on UNIX, the documentation is shipped with your system. For example, to learn about these modes, read the manual page (man page) for fopen. To do so, type man fopen into a terminal. Try it out! In my experience, what separates poor programmers from good programmers is that the former don't read documentation or see it as beneath themselves to look things up while the latter have piles of documentation open all the time and constantly look things up they use.
2 of 3
3
If an implementation were not intended to read files written by other programs on a system, nor to produce files that could be read by other programs on a system, it wouldn't be necessary to distinguish between text and binary files. On some systems, however, a text file containing two lines "Hi" and "there" would need to contain a sequence of bytes other than H, i, newline, t, h, e, r, e, newline. Opening a file in text mode specifies that if a C program attempts to read the first nine bytes from a file containing the aforementioned two lines it should yield the above sequence of bytes, and writing the above sequence of bytes should write whatever information would be needed to represent those two lines. On MS-DOS or Windows implementations, any CR+LF (return plus newline) sequence which appears in the original file will be replaced with a newline, and writing a newline will produce the byte sequence CR+LF. Implementation may potentially vary in how they treat CR characters that are not immediately followed by newlines, or newlines that are not immediately preceded by CR. Classic Macintosh systems would, if I recall, swap the CR and LF characters (so writing a return would output an LF and writing a newline would output a CR; Macintosh programs used bare carriage returns as line separators, and while I don't know that any non-C programs would have expected to treat an LF character as a return, swapping the two characters means that if one C program outputs `'\r` to a file in text mode, a C program that reads the file in text mode will get `\r`,
🌐
Sololearn
sololearn.com › en › Discuss › 2016569 › what-does-the-b-r-t-a-do-in-c-programming
What does the /b /r /t /a do in c programming | Sololearn: Learn to code for FREE!
September 26, 2019 - They exist because escape characters ... represented as backslash \ followed by a character. \b represents a backspace \r represents a carriage return \t represents a tab \a represenst a bell....
🌐
Quora
quora.com › What-is-the-difference-between-the-r-and-rb-modes-of-the-open-function-in-the-C-programming-language
What is the difference between the 'r' and 'rb' modes of the open() function in the C programming language? - Quora
Answer: Probably not a lot, with many operating systems. The “r” is obviously for read, and the “b” is for binary. It’s a hint/requirement/suggestion to the particular system being used that the data is really to be treated as binary data, and not textual data.
Find elsewhere
🌐
Advanced R
adv-r.had.co.nz › C-interface.html
R's C interface · Advanced R.
C data structures shows how to translate data structure names from R to C. Creating and modifying vectors teaches you how to create, modify, and coerce vectors in C. Pairlists shows you how to work with pairlists. You need to know this because the distinction between pairlists and list is more important in C than R.
🌐
Educative
educative.io › answers › what-is-the-c-function-in-r
What is the c() function in R?
The c() function returns an expression or vector with an appropriate mode. ... Lines 1 and 2: We take three values and concatenate them. Line 5: We use the c() function to concatenate the values in the objects a and b.
🌐
RDocumentation
rdocumentation.org › packages › base › versions › 3.6.2 › topics › c
c: Combine Values into a Vector or List
logical. If recursive = TRUE, the function recursively descends through lists (and pairlists) combining all their elements into a vector. ... NULL or an expression or a vector of an appropriate mode. (With no arguments the value is NULL.) This function is S4 generic, but with argument list (x, ...).
🌐
McGill Library
libraryguides.mcgill.ca › c.php
Common Operators in R - Learn R - Guides at McGill Library
This guide focuses on transformation and cleaning functions in R that are especially useful for working with tabular datasets. ... Schulich Library of Physical Sciences, Life Sciences and Engineering Macdonald-Stewart Library Building 809 rue Sherbrooke Ouest Montréal, Québec H3A 0C1
🌐
GeeksforGeeks
geeksforgeeks.org › c language › escape-sequence-in-c
Escape Sequence in C - GeeksforGeeks
Different escape sequences represent different characters but the output is dependent on the compiler you are using. The following are the escape sequence examples that demonstrate how to use different escape sequences in C language.
Published   November 1, 2025
🌐
DataCamp
datacamp.com › tutorial › r-c-function
R c Function(): Creating Vectors the Easy Way | DataCamp
July 1, 2025 - The R c() function documentation tells us that c() combines values into a vector (so I think it’s safe to assume the “c” stands for “combine”). If you're unclear what that means, I'll show how in the examples below.
🌐
UrbanPro
urbanpro.com › c language › learn c language
What exactly is \r in the C language? - UrbanPro
April 15, 2025 - When encountered in a string or character literal, \r represents thecarriage return character. In the context of output, \r moves the cursor to the beginning of the current line without advancing to the next line.
🌐
UCSF Health
ucsfhealth.org › care › medical-tests › rbc-count
RBC count | UCSF Health
The RBC count is almost always part of a complete blood count ( ... The ranges above are common measurements for results of these tests. Normal value ranges may vary slightly among different laboratories. Some labs use different measurements or test different samples. Talk to your health care provider about the meaning of your specific test results. ... Your RBC count will increase for several weeks when you are in a higher altitude.
🌐
Statology
statology.org › home › an introduction to the c() function in r
An Introduction to the c() Function in R
March 16, 2022 - The result is a data frame with three columns, each created by using the c() function. The following tutorials explain how to use other common functions in R:
🌐
Quora
quora.com › What-exactly-is-r-in-the-C-language
What exactly is \r in the C language? - Quora
Answer (1 of 8): \r is used as a escape sequence in C language. Now the question is.. What are escape sequences? In C programming language, there are 256 numbers of characters in character set. The entire character set is divided into 2 parts i.e. the ASCII characters set and the extended ASCI...