1

Why does strncpy() return a pointer, when char *dest gets assigned anyway?

Is this simply a design decision to make it more flexible?

retrodev
  • 2,323
  • 6
  • 24
  • 48
  • 1
    Standard warning: `strncpy` is a poorly named function, that can lead to subtle buffer overflow bugs if incorrectly used (which is easy to do accidentally). It should be avoided. – user694733 Oct 31 '16 at 11:08
  • @usr Read the question before marking as duplicate !! – Anjaneyulu Oct 31 '16 at 11:58

0 Answers0