Write a C program to illustrate \' escape sequence/ and \" escape sequence to print single quote and double quote

0

Here is an example of a C program that uses the \' and \" escape sequences to print single quote and double quote:


When the program is run, it will output "This is a single quote: ', and this is a double quote: ""


The \' escape sequence is used to print a single quote, and the \" escape sequence is used to print a double quote.


It is platform-independent and will work the same way on all operating systems and terminals.


It can also be used to include a single quote or double quote in a string.


Alternatively, you can also use single quotes to enclose strings that contains double quotes and vice versa.

This will also produce the same output as the first example.

Post a Comment

0Comments
Post a Comment (0)