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

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -