Search code examples
cunixmanpage

man pages for c variable types


Are there any Unix man pages or similar standardized reference for variable type declarations (in c)?

For example, if I want details on the float variable type and different ways to declare it, is there a standardized reference in Unix? The compiler man pages? Or is an online reference or book on C required?

I just saw float power=2.345f when reading Learn C the Hard Way, was wondering what the f means, and quickly learned that man 3 float and man float do not produce anything, and even man -k float does not seem to show any relevant results.

So, where to look for definitive answers about c variable types and their declarations, preferably retrievable on the OS without internet access?


Solution

  • Read the C11 standard. On wikipedia, you will find referencess to all standards, including the older ones. Do not worry (too much) about them being draft; that is mustly due to ortographic corrections, etc. The final versions will cost money, so most here (and elsewhere) use the drafts.

    Linux man pages for C functions are mostly a courtesy and cover POSIX aspects. You should not rely they exist or complain they do not.

    If you have problems reading the standard, just get a good book.