ccoding-style

What does 'ap' stand for in C examples?


For example, in the reference:

type va_arg (va_list ap, type)

Does ap stand for argument pointer? Something else?


Solution

  • That's actually an easy question to answer.

    ap stands for argument pointer.

    From The C Programming Language, Second Edition, Brian W. Kernighan and Dennis M. Ritchie:

    7.3 Variable-length Argument Lists

    [...] The type va_list is used to declare a variable that will refer to each argument in turn; in minprintf, this variable is called ap, for "argument pointer"