0

See the code in the Decription and tell why adding a " \ " results in printing of "\\n" ?

See the following code: #include<iostream> using namespace std; int main () { /* I am writing a code to print " \n" in the output screen */ cout<<" WORDs "; cout << "\n"; /* See the above line doesn't print \n on the output screen after compilation , at the time of running it just gives some space in the output screen the*/ cout << " \\n"; /* The above line does print \ n on the output screen */ return 0; } Now why this is happening ? . Why adding a " \ " results in printing of "\\n" ?

17th Mar 2017, 9:16 PM
cool_boy12344
cool_boy12344 - avatar
1 Antwort
+ 3
I just explained, in your other post :-(
17th Mar 2017, 9:22 PM
Meharban Singh
Meharban Singh - avatar