Search notes:

C

main

#include <stdio.h>

int main(int argc, char ** argv, char **envp) {

    printf("argc = %d\n", argc);

 //
 // Show arguments given to the program.
 // argv[0] is the name of the program itself.
 //
    for (int arg=0; arg<argc; arg++) {
        printf("argv[%d] = %s\n", arg, argv[arg]);
    }

 //
 // Show environment variables:
 //
    char* envv;
    while (envv = *envp++) {
        printf("%s\n", envv);
    }

    return 0;
}
Github repository about-c, path: /main.c

gnu C option summary

https://gcc.gnu.org/onlinedocs/gcc-6-1.0/gcc/Option-Summary.html

Statements

Two types of statements:
Simple statements:
Compound statements:

TODO

--print-file-name

gcc --print-file-name=include
gcc --print-file-name=include/stddef.h

gcc --print-file-name=crtbegin.o
gcc --print-file-name=crtend.o

Hosted vs freestanding

freestanding is just the language (without libraries etc.). A hosted environment comes with the the standard library.
When compiling for a hosted environment, the macro __STDC_HOSTED__ is defined.

See also

_Generic
datatypes
C / C++
C standards
Memory allocation

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1758192048, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/C-C-plus-plus/C/index(122): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78