Get the latest tech news

Is C99 Turing-Complete?


I was trying to explain to someone that C is Turing-complete, and realized that I don't actually know if it is, indeed, technically Turing-complete. (C as in the abstract semantics, not as in an ac...

Note: Other answers seem to suggest that Turing completeness requires arbitrary memory access, but that's simply not true. Ignoring other features for information access other than pointers, it is probably true that a DFA could perfectly model C for a fixed character size and size_t due to the finite amount of memory. Since I dont see any reason why our function of the input can't be quadratic, and NSPACE(O(n)) being a subset of DSPACE(O(n^2)) per Savitch's theorem, C is just as powerful as any nondeterministic LBA.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of C99 Turing-Complete

C99 Turing-Complete