It means execute and return memcpy(p, s, len)
, unless p==0
. If p==0
, it will return NULL
, and not execute memcpy(p, s, len)
.
Read https://en.wikipedia.org/wiki/%3F:#C for more.
Also, to paraphrase http://man7.org/linux/man-pages/man3/memcpy.3.html:
The memcpy() function copies len bytes from memory area p to memory area s. The memory areas must not overlap.
That is, if we have the below memory:
p s
[][1][2][3][][][4][5][6][]
and len == 3, then when memcpy is called we get:
p s
[][1][2][3][][][1][2][3][]
Finally, the value a function returns is the value it evaluates to if you then use it in an expression; if foo()
returns 5, print(foo());
prints 5.