gpt-4.1-2025-04-14· OpenAI
LMArena Human Preference 140K
gimme the most confusing libc function name
- User
gimme the most confusing libc function name
- Assistant
There are a lot of confusing function names in the C standard library (
libc), butstrtokis a classic contender for the most confusing. Here’s why:- Name:
strtokstands for "string token," but the name is cryptic and not self-explanatory. - Behavior: It modifies its input string, uses internal static state, and is not thread-safe.
- Usage: The function’s usage pattern (passing
NULLafter the first call) is unintuitive for many programmers.
Honorable mentions:
strxfrm(string transform for locale-aware sorting)memchr(memory character search)strspn/strcspn(span of set/not in set)
But for sheer confusion,
strtokis a classic! - Name:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.