+ 3

What does the /b /r /t /a do in c programming

26th Sep 2019, 5:15 PM
Krishna _6431
Krishna _6431 - avatar
2 Answers
+ 3
They are special characters. They exist because escape characters don't have own character, there is no 1 character representatikns for characters, such as newlines and tabs, so they are represented as backslash \ followed by a character. \b represents a backspace \r represents a carriage return \t represents a tab \a represenst a bell. I don't actually know what carriage return and bell does, but tab often represents 4 spaces and \b represents backspace (hides previous character). printf("hello\tworld!"); #hello world! printf("hello\bworld!"); #hellworld!
26th Sep 2019, 5:48 PM
Seb TheS
Seb TheS - avatar
+ 3
thanks
26th Sep 2019, 6:30 PM
Krishna _6431
Krishna _6431 - avatar