+ 1

Can anyone help me i need help what is "/r" in c++ am confused

12th Sep 2018, 5:36 AM
HINDUSTANI MOBILE GAMER GURU
HINDUSTANI MOBILE GAMER GURU - avatar
4 Answers
+ 8
Sonic Oh yes I miss-typed
12th Sep 2018, 9:09 AM
blACk sh4d0w
blACk sh4d0w - avatar
+ 7
/r is an escape sequence which means Carriage Return. It takes cursor to the start of the current line. cout << "COMPUTER/rSCIENCE"; What it does is first it will print COMPUTER to the console then it will take cursor back to the beginning of the current line and will print SCIENCE. So the output will be like this: SCIENCEER
12th Sep 2018, 7:10 AM
blACk sh4d0w
blACk sh4d0w - avatar
+ 5
If you're talking about \r, it's a carriage return and will jump back to the beginning of the line (e.g. in console output, if supported). It's similar to \n which jumps to a new line.
12th Sep 2018, 7:10 AM
Anna
Anna - avatar
+ 4
HINDUSTANI MOBILE GAMER GURU do you mean '\r'? See Anna's answer. It means carriage return. nAutAxH AhmAd 's example is good but it should be \r and not /r.
12th Sep 2018, 8:39 AM
Sonic
Sonic - avatar