String length using pointers

后端 未结 3 516
轮回少年
轮回少年 2021-01-29 12:54

I was looking up some code tricks. I found one that I get the basics but I don\'t understand why it exits. It has to do with a string pointer in a while loop. Usually I don\'

3条回答
  •  一生所求
    2021-01-29 13:32

    while(*(s+c)) returns false when the null character is encountered and breaks the loop

提交回复
热议问题