Swift Program to Demonstrate the Escape Sequences

You are currently viewing Swift Program to Demonstrate the Escape Sequences

Swift program to demonstrate the escape sequences

// Swift program to demonstrate the
// escape sequences

print("Hello\nWorld");
print("Hello\tWorld");
print("Hello\rWorld");
print("\"Hello World\"");
print("\'Hello World\'");
print("\\Hello World\\");

Output

Hello
World
Hello   World
World
"Hello World"
'Hello World'
\Hello World\

...Program finished with exit code 0
Press ENTER to exit console.

Ranjith

Hi, I'm Manoj a full-time Blogger, YouTuber, Affiliate Marketer, & founder of Coding Diksha. Here, I post about programming to help developers.

Leave a Reply