Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

236
Views
Why does the memccpy function use an int parameter?

memccpy is defined as:

void *memccpy(void *dest, const void *src, int c, size_t n)

I understand that integer c is used as an unsigned char by type casting.

Then I think

void *memccpy(void *dest, const void *src, unsigned char c, size_t n)

looks better. Is there any reason memccpy must use an int parameter?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

In ancient C, there was no way to pass an argument as an unsigned char; all arguments were promoted to at least int. Changing the parameter type to unsigned char now would break compatibility. (That could possibly be worked around, but there is no demand for it.)

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!