开发者

behaviour of escape characters

开发者 https://www.devze.com 2023-01-21 20:24 出处:网络
#include <stdio.h> main() 开发者_如何学C{ printf(\"az\\b\\b\"); printf(\"s\\ni\"); } above program when compiled with gcc gives output
#include <stdio.h>
main()
开发者_如何学C{

   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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号