c – behaviour of escape characters – Education Career Blog

#include <stdio.h>
main()
{

   printf("az\b\b");

   printf("s\ni");

}

above program when compiled with gcc gives output

sz

i

Can someone help us out to understand the output

,

That’s because your console interprets '\b' as a backspace character.

Leave a Comment