Escape Sequence in C - Octal and Hexadecimal Escape Sequences in C



 Octal and Hexadecimal Escape Sequences in C

Learn c - c tutorial - Octal and Hexadecimal Escape Sequences in C - c examples - c programs

Octal and Hexadecimal Escape Sequences in C

  • An Escape Sequence starts with backslash [\] and a single character like '\n', '\t' etc. It is used for some specific data format like ‘\n’ is used set pointer at the beginning of next line and '\t' is used to set pointer on next tab stop.
  • Some octal and hexadecimal values after the backslash is known as octal and hexadecimal Escape Sequences.

Sample Code

#include <stdio.h>
int main()
{
    printf("wiki\012techy");
    printf("\n");
    printf("kaashiv\x0A academy");
    printf("\n");
    return 0;
}

Output

wiki
techy
kaashiv
academy


View More Quick Examples


Related Searches to Escape Sequence in C - Octal and Hexadecimal Escape Sequences in C