Hidden features of C -
i know there standard behind c compiler implementations, there should no hidden features. despite that, sure c developers have hidden/secret tricks use time.
function pointers. can use table of function pointers implement, e.g., fast indirect-threaded code interpreters (forth) or byte-code dispatchers, or simulate oo-like virtual methods.
then there hidden gems in standard library, such qsort(),bsearch(), strpbrk(), strcspn() [the latter 2 being useful implementing strtok() replacement].
a misfeature of c signed arithmetic overflow undefined behavior (ub). whenever see expression such x+y, both being signed ints, might potentially overflow , cause ub.
Comments
Post a Comment