1

Sorry for the silly question, may be a duplicate.

So memset is defined as:

void * memset(void * ptr, int value, size_t num);

However, we all know that memset sets bytes of ptr to value. My question is, why is value defined as int when it will be interpreted as uint8_t?

Is it due to some legacy compatibility or int actually makes sense in a way I can't comprehend? :)

Shakaron
  • 1,027
  • 10
  • 24

0 Answers0