Calculating output str

Original link: https://www.nowcoder.com/test/question/done?tid=26521400&qid=68020#summary

The output is the following program segment ()
char STR [] = "ab & \ 012 \ n-";
the printf ( "% D", strlen (STR));

answer:

\ 012 is the octal number 10, which is the ASCII equivalent \ n symbol.
Additionally \ represents a character, slash.
And strlen result is not end of string, so the answer is five.
Here Insert Picture Description

Guess you like

Origin blog.csdn.net/weixin_45380951/article/details/100054808