0
Follow
0
View

And what is the size of strlen

dingning00 注册会员
2023-02-25 03:08
  • found a very good blog for you to see if it helps.
  • Also check the manual: < a href = "https://zh.cppreference.com/w/c/string/byte/strlen" target = "_blank" > < font size = "3" > c language - strlen() < / font > < / a >
dutuoyu 注册会员
2023-02-25 03:08

char c[20]="101\101\0101" Char c [20] = "101\101\010 1" = "101" a, b1, so the printf(" % s \ n ", c); Output: 1011

DDN911 注册会员
2023-02-25 03:08

sizeof 20
strlen 6, stop at \0