C Language

Escape Sequences

In C Language by Baqir AliLeave a Comment

Define Escape Sequences in C.

Set of Characters to adjust the cursor(-) location on-screen while coding in console mode in c language.

\n For New Line  \f Form Feed
\t For tab \’ To Print  ‘
\b For back space \” To Print  “
\r For Carriage Return \\ To Print  \
#include <stdio.h>
#include <stdlib.h>

/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main(int argc, char *argv[]) {
	
	//Escape Sequences : escape sequences are used to control the position of cursor on screen
	
	printf("Welcome to Code Modes");
	printf("\n");
	printf("\t");
	printf("We just love coding");
	printf("\n");
	printf("\t\t");
	printf("Visit \n\t\tour \n\t\t\twebsite");
	return 0;
}

Output is:

Escape Sequences
Escape Sequences

Escape Sequences Example

Support us by sharing this post

About the Author

Baqir Ali

Facebook Twitter

Hi, I am Baqir Ali ---- Blogger, Programmer, and a Teacher. I am currently working as a Programmer for Softnat Technologies. I have tons of ideas and data to share with you all via blogging.

Leave a Comment