Escape Sequence in C || Lesson 12 || C Programming || Learning Monkey ||
Escape Sequence in C
In this class, we will try to understand Escape Sequence in C.
In our previous class on Formatted I/O, we have modified the printf() function of the first program.
The modification is as shown in the image below.
In the first printf() function of the program, we used \n at the end.
The \n is an escape sequence.
The escape sequences can be used in the format string of the printf() function to do a specific action.
\n is used to move the cursor to a new line.
For example, consider the following format string “Welcome to “Learning Monkey” Start learning. ” to be used in the printf() function as shown below.
printf(“Welcome to “Learning Monkey” Start learning. “)
Here the printf() function will generate an error because the double quotes used before Learning will be considered the end of the format string.
C can resolve this by using \” escape sequence.
Let us rewrite the printf() by using \” escape sequence.
printf(“Welcome to \”Learning Monkey\” Start learning. “)
The double quotes are considered the characters, not as the end of the format string.
Similarly, consider another printf() function given below.
printf(“Welcome to \Learning Monkey Start learning. “)
In the above printf, we want to print \ character before L, but the compiler will consider \L as an escape sequence.
As C doesn’t support \L escape sequence, it will generate a warning.
To consider \ as a character, we use \ escape sequence.
Let us rewrite the printf() by using \ escape sequence.
printf(“Welcome to \Learning Monkey Start learning. “)
Link for playlists:
https://www.youtube.com/channel/UCl8x4Pn9Mnh_C1fue-Yndig/playlists
Link for our website: https://learningmonkey.in
Follow us on Facebook @ https://www.facebook.com/learningmonkey
Follow us on Instagram @ https://www.instagram.com/learningmonkey1/
Follow us on Twitter @ https://twitter.com/_learningmonkey
Mail us @ [email protected]
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Escape Sequence in C || Lesson 12 || C Programming || Learning Monkey ||», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.