C Programming
There are many outstanding books and online resources where you can learn C and as such this site will not try and duplicate these efforts.
What I will try to do here is try to complement other sources, trying to explain parts which are easily overlooked by beginners or are difficult to remember. I hope that you like what is on offer and if you do, please bookmark these pages and spread the word.
- The C Language
- Standard Library
- The Standard Headers
- stdarg.h - variadic functions
Macros: va_start enables access to variadic function arguments (function macro) va_arg accesses the next variadic function argument(function macro) va_copy (C99) makes a copy of the variadic function arguments (function macro) va_end ends traversal of the variadic function arguments (function macro) Type: va_list holds the information needed by va_start, va_arg, va_end, and va_copy (typedef) #include <stdio.h> #include <stdarg.h> void simple_printf(const char* fmt, ...) { va_list args; va_start(args, fmt); while (*fmt != '0') { if (*fmt == 'd') { int i = va_arg(args, int); printf("%dn", i); } else if (*fmt == 'c') { // A 'char' variable will be promoted to 'int' // A character literal in C is already 'int' by itself int c = va_arg(args, int); printf("%cn", c); } else if (*fmt == 'f') { double d = va_arg(args, double); printf("%fn", d); } ++fmt; } va_end(args); }
- Functions at a Glance
- Basic Tools
- Compiling with GCC
- Using make to Build C Programs
- Debugging C Programs with GDB
- Using an IDE with C
- Unicode in C
- Problem Solving
- The-C-Programming-Language-2nd-Edition Source Code on Github
- Build Your Own Lisp in C
- Dive Into Systems
- devdocs.io
- cppreference
- Excellent Free Tutorials to Learn C - LinuxLinks
- richard-stallman-c-reference
- Programming Simplified: C programming Examples
- Thee Geek Stuff: Variadic Functions
- Wikibooks: Programming Termios
- CHL - Create a Webapps in C
- libc manual
- c-programming-projects-with-source-code-coding-projects-ideas
Videos
Books
Other External Links
19may23 | admin |