santhosh
santhosh

Reputation: 41

behaviour of escape characters

#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

Upvotes: 1

Views: 88

Answers (1)

sbi
sbi

Reputation: 224079

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

Upvotes: 3

Related Questions