Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

Escape sequence\\\65 gives \5; why?

0 votes
asked Nov 24, 2017 by Nidhi
#include <stdio.h>

int main()
{
    printf("\\\65");

    return 0;
}

1 Answer

+1 vote
answered Nov 28, 2017 by Sathyamshu (260 points)

\\ - in order to print one slash........otp - \

\(any number or alphabet or symbol ) eg: \a , \n,\5   -   treated as a single character...and performs its action if already exists.....or else....ignores..


In ur example - \\\65

the first two slashes make u to get a single slash      -     \

next...\6 is not any predefined symbol to perform something...so ignores -   

later.....it prints the character(5) - 5

so the final output is \5.

Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...