• C standard library (redirect from Stdlib.h)
    ratified in 1995. Six more header files (complex.h, fenv.h, inttypes.h, stdbool.h, stdint.h, and tgmath.h) were added with C99, a revision to the C Standard...
    37 KB (3,694 words) - 11:18, 26 January 2025
  • Berkeley sockets (redirect from Socket.h)
    <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include...
    29 KB (3,512 words) - 08:53, 28 April 2025
  • allocates memory, but doesn't free the memory before exiting. #include <stdlib.h> int main(void) { int * a; a = malloc(sizeof(int)); /* allocate memory...
    6 KB (709 words) - 04:20, 27 February 2025
  • the macro will print a message to stderr and call abort(), defined in stdlib.h. The message includes the source filename and the source line number from...
    7 KB (779 words) - 21:51, 9 June 2023
  • Thumbnail for GNU Debugger
    the following source-code written in C: #include <stdio.h> #include <stdlib.h> #include <string.h> size_t foo_len(const char *s) { return strlen(s); } int...
    18 KB (1,722 words) - 07:47, 7 June 2025
  • Thumbnail for Dangling pointer
    variables which may contain a copy of the pointer. #include <assert.h> #include <stdlib.h> /* Alternative version for 'free()' */ static void safefree(void...
    14 KB (1,824 words) - 22:29, 2 April 2025
  • _FRUIT_INCLUDED_ */ fruit.c: #include <string.h> #include <stdlib.h> #include <stddef.h> #include <stdio.h> #include "fruit.h" static struct fruit *fruit_list; static...
    26 KB (2,812 words) - 20:26, 18 January 2025
  • the "else" block under "try". #include <setjmp.h> #include <stdio.h> #include <stdlib.h> #include <string.h> static void first(); static void second(); /*...
    15 KB (1,784 words) - 01:57, 17 April 2025
  • function ends. The C dynamic memory allocation functions are defined in stdlib.h header (cstdlib header in C++). malloc() takes a single argument (the amount...
    36 KB (4,140 words) - 10:03, 27 May 2025
  • Pthreads (redirect from Pthread.h)
    of pthreads in C: #include <stdio.h> #include <stdlib.h> #include <assert.h> #include <pthread.h> #include <unistd.h> #define NUM_THREADS 5 void *perform_work(void...
    9 KB (1,086 words) - 18:33, 19 February 2025
  • Thumbnail for C syntax
    to pass a pointer to that pointer: its address. #include <stdio.h> #include <stdlib.h> void allocate_array(int ** const a_p, const int A) { /* allocate...
    85 KB (10,850 words) - 17:42, 6 June 2025
  • the strtol() function (which converts strings to long integers) in the <stdlib.h> library. Many other programming languages, such as Python, Perl, Ruby...
    10 KB (1,231 words) - 17:16, 29 April 2025
  • <sys/types.h> #include <sys/mman.h> #include <err.h> #include <fcntl.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> /* This...
    10 KB (1,155 words) - 08:10, 14 May 2025
  • valid memory region to another, as in the following example: #include <stdlib.h> int main() { char *p = malloc(1024); /* first dynamically-allocated block...
    4 KB (344 words) - 20:38, 30 March 2023
  • #include <stdio.h> /* for printf */ #include <stdlib.h> /* for exit */ #include <getopt.h> /* for getopt_long; POSIX standard getopt is in unistd.h */ int main...
    21 KB (2,408 words) - 22:05, 22 April 2024
  • value) to work around these problems. #include <stdio.h> #include <stdlib.h> #include <locale.h> int main(void) { /* Locale is set to "C" before this...
    4 KB (364 words) - 08:28, 7 November 2023
  • of C code shows how to sort a list of integers using qsort. #include <stdlib.h> /* Comparison function. Receives two generic (void) pointers to the items...
    7 KB (831 words) - 01:08, 27 January 2025
  • functions in <string.h> to allocate a copy of a string – similar to POSIX and SVID C extensions. Add memalignment() function in <stdlib.h> to determine the...
    39 KB (3,264 words) - 12:28, 4 June 2025
  • In the C and C++ programming languages, unistd.h is the name of the header file that provides access to the POSIX operating system API. It is defined...
    13 KB (302 words) - 16:27, 5 February 2025
  • "PRBS-7" sequence can be expressed in C as #include <stdio.h> #include <stdint.h> #include <stdlib.h> int main(int argc, char* argv[]) { uint8_t start = 0x02;...
    8 KB (1,064 words) - 16:26, 5 February 2024
  • (program1 and program2) using Unix pipes: #include <stdio.h> #include <stdlib.h> #include <unistd.h> /* function prototypes */ void die(const char*); int...
    4 KB (547 words) - 13:09, 7 September 2023
  • such as <regex> rather than <regex.h>, <thread> rather than <pthread.h>, or <semaphore> rather than <semaphore.h>. POSIX C standard library C++ standard...
    10 KB (181 words) - 12:16, 23 April 2025
  • written in the C programming language with AT&T assembly syntax. #include <stdlib.h> int main(int argc, char **argv) { int *iptr; char *cptr; #if defined(__GNUC__)...
    8 KB (1,037 words) - 17:10, 26 January 2025
  • shuffle(deck) An implementation in C: #include <stdio.h> #include <stdlib.h> #include <time.h> // executes in-place bogo sort on a given array static...
    15 KB (1,891 words) - 07:00, 3 May 2025
  • Thumbnail for GNU Autotools
    the 31,085 lines of configure for libtool still check if <sys/stat.h> and <stdlib.h> exist, even though the Unixen, which lacked them, had neither sufficient...
    10 KB (1,090 words) - 06:53, 8 January 2025
  • Thumbnail for Syntax highlighting
    it impossible to create syntactically incorrect programs. In 1982, Anita H. Klock and Jan B. Chodak filed a patent for the first known syntax highlighting...
    14 KB (1,556 words) - 18:41, 11 April 2025
  • current time to the standard output stream. #include <time.h> #include <stdlib.h> #include <stdio.h> int main(void) { time_t current_time; char* c_time_string;...
    6 KB (349 words) - 16:39, 8 April 2025
  • style of C's ldiv() */ typedef struct { /* This structure is part of the C stdlib.h, but is reproduced here for clarity */ long int quot; long int rem; } ldiv_t;...
    46 KB (3,354 words) - 15:54, 31 May 2025
  • Compiler. #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <sys/wait.h> #include <signal.h> #define NUMCHLDS 10 void...
    6 KB (732 words) - 14:04, 30 July 2024
  • the value of i: #include <pthread.h> #include <stdatomic.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> /* i is global, so it is visible...
    7 KB (842 words) - 07:20, 2 November 2024