What's the use of memset() return value?

后端 未结 4 1206
无人共我
无人共我 2020-12-15 02:16

memset() is declared to return void* that is always the same value as the address passed into the function.

What\'s the use of the return v

4条回答
  •  一生所求
    2020-12-15 03:04

    It may be used for call chaining like:

    char a[200];
    strcpy(memset(a, 0, 200), "bla");
    

提交回复
热议问题