Gang Of Coders
Home
About Us
Contact Us
All C Solutions on Gang of Coders
Total of 2264 C Solutions
What is the "-->" operator in C/C++?
C
Operators
Code Formatting
Standards Compliance
What does "static" mean in C?
C
Syntax
Static
Removing trailing newline character from fgets() input
C
String
Gcc
Newline
Fgets
How to convert an int to string in C?
C
String
Integer
Is "==" in sorted array not faster than unsorted array?
C
Arrays
Performance
Optimization
Sortedlist
'\0' evaluates false, "\0" evaluates true
C
Arrays
String
Null
Kernighan and-Ritchie
Violating of strict-aliasing in C, even without any casting?
C
Strict Aliasing
Why is the maximum size of an array "too large"?
C
Gcc
Mingw
Size T
Stdint
How do I start threads in plain C?
C
Multithreading
Capturing stdout from a system() command optimally
C++
C
System
Stdout
Why can't we initialize members inside a structure?
C
Struct
Initialization
Member
CRC32 C or C++ implementation
C++
C
Crc32
Linux API to list running processes?
C++
C
Linux
Api
Process
What does the %*s format specifier mean?
C
Printf
Format Specifiers
How does this bitwise operation check for a power of 2?
C
Math
Bit Manipulation
clearing a small integer array: memset vs. for loop
C
Performance
Benchmarking
GCC's assembly output of an empty program on x86, win32
C
Gcc
X86
Gnu Assembler
Tdm Mingw
Regular expression for a string literal in flex/lex
C
Regex
Lex
String Literals
Flex Lexer
What is the use of typedef?
C
Typedef
Can sizeof return 0 (zero)
C++
C
Sizeof
python tracing a segmentation fault
Python
C
Debugging
What does the extern keyword mean?
C
Objective C
Extern
What is the best way to suppress A "Unused variable x" warning?
C
Gcc
How to display hexadecimal numbers in C?
C
Format
Integer
Printf
Hex
How do I convert a Python list into a C array by using ctypes?
Python
C
Ctypes
Extracting bits with a single multiplication
C
Multiplication
Bit Manipulation
What does a type followed by _t (underscore-t) represent?
C
Naming Conventions
Types
gcc -g :what will happen
C++
C
Gcc
Gdb
Why are SDL and OpenGL related?
C++
C
Opengl
Sdl
Dynamically create an array of strings with malloc
C
Arrays
Malloc
How to count characters in a unicode string in C
C
String
Unicode
Ascii
Does dynamic memory allocation differ in C and C++ in popular implementations?
C++
C
Memory Management
ld.exe: cannot open output file ... : Permission denied
C
Windows
Windows 7
Codeblocks
Mingw32
A simple explanation of what is MinGW
C
Windows
Gcc
Cygwin
Mingw
Check glibc version for a particular gcc compiler
C
Gcc
Glibc
What are the incompatible differences between C(99) and C++(11)?
C++
C
C++11
C99
Should I worry about the alignment during pointer casting?
C++
C
Casting
Alignment
Why are global variables always initialized to '0', but not local variables?
C
Variables
Global
Local
Stringification - how does it work?
C++
C
C Preprocessor
Stringification
Why is a = (a+b) - (b=a) a bad choice for swapping two integers?
C++
C
Swap
Undefined Behavior
Sequence Points
When to use pthread_exit() and when to use pthread_join() in Linux?
C
Linux
Pthreads
gcc: undefined reference to
C++
C
Gcc
Linker
Undefined Reference
How do I ask for "at least" a size of an int in C
C++
C
Optimization
Why an expression instead of a constant, in a C for-loop's conditional?
C
For Loop
Coding Style
Expression
Constantfolding
What is a bus error? Is it different from a segmentation fault?
C
Unix
Segmentation Fault
Bus Error
Is multiplication and division using shift operators in C actually faster?
C++
C
Division
Multiplication
Bit Shift
What does the constant 0.0039215689 represent?
C
Floating Point
Constants
Magic Numbers
When should I just use "int" versus more sign-specific or size-specific types?
C
Unsigned
Signed
Why isn't there int128_t?
C++
C
C++ Standard-Library
C Standard-Library
Does a[a[0]] = 1 produce undefined behavior?
C
Language Lawyer
C99
Undefined Behavior
C/C++: Static function in header file, what does it mean?
C++
C
Function
Static
Implementing a HashMap in C
C
Data Structures
Hashmap
Resources for learning C program design
C
Is it ok to use "classic" malloc()/free() in Objective-C/iPhone apps?
C
Objective C
Memory Management
How can Inheritance be modelled using C?
C
Oop
Inheritance
Algorithm to generate bit mask
C
Algorithm
Bit Manipulation
Comparison operation on unsigned and signed integers
C
Gcc
Unsigned
Signed
What does malloc(0) return?
C
Linux
Pointers
Malloc
Realloc
How to perform atomic operations on Linux that work on x86, arm, GCC and icc?
C++
C
Linux
Atomic
Can I mix static and shared-object libraries when linking?
C
Gcc
Static
Linker
What does an object file contain?
C++
C
Compilation
Why do C programmers use typedefs to rename basic types?
C++
C
Is returning void valid code?
C++
C
How do I create an array of strings in C?
C
Arrays
String
Why does the arrow (->) operator in C exist?
C
Pointers
Dereference
When is it worthwhile to use bit fields?
C++
C
Bit Fields
Which functions in the C standard library commonly encourage bad practice?
C
Security
C99
Standard Library
Memory alignment in C-structs
C++
C
Memory
Memory Alignment
Structure Packing
Why does memset take an int instead of a char?
C
Memset
Do unused functions get optimized out?
C++
C
Compiler Construction
How to printf long long
C
Long Integer
Pi
Which of sprintf/snprintf is more secure?
C
Security
Unix
Printf
Secure Coding
How to use the addr2line command in Linux?
C
Linux
Valgrind
Addr2line
Multi-character constant warnings
C++
C
Casting
Compiler Warnings
Portability
Writing a "real" interactive terminal program like vim, htop, ... in C/C++ without ncurses
C++
C
Terminal
Interactive
Function pointers and address of a function
C
Function
Pointers
Function Pointers
Will a `char` always-always-always have 8 bits?
C
Memory
python bindings, how does it work?
Python
C
Binding
Function to Calculate a CRC16 Checksum
C
Crc
Crc16
How to create a struct on the stack in C?
C
Heap Memory
Stack Memory
Printing leading zeroes for hexadecimal in C
C
Linux
Formatting
Why do some kernel programmers use goto instead of simple while loops?
C
Linux
Loops
Linux Kernel
Goto
C/C++ Why to use unsigned char for binary data?
C++
C
Character Encoding
Bytebuffer
Rawbytestring
variably modified array at file scope in C
C
Arrays
Static
What happens when I assign long int to int in C?
C
Casting
Integer
Variable Assignment
Long Integer
Does standard c library provides linked list etc. data structures?
C
Gcc
Data Structures
Glibc
Is there any reason for using if(1 || !Foo())?
C++
C
If Statement
Syntax
Logical Operators
How to convert a string to integer in C?
C
String
Atoi
Purpose of while(1); statement in C
C
While Loop
What does __asm__ __volatile__ do in C?
C
Gcc
Inline Assembly
iOS library to BitCode
C
Ios8
Xcode7 Beta2
Bitcode
Is this a good way to free memory?
C
Memory
Free
Loop starting at -1 doesn't print anything
C
Loops
Integer
Sizeof
Negative Number
In a structure, is it legal to use one array field to access another one?
C++
C
Arrays
Struct
Are char arrays guaranteed to be null terminated?
C
String Literals
Array Initialization
How can I include a C header that uses a C++ keyword as an identifier in C++?
C++
C
Clang
Passing multidimensional arrays as function arguments in C
C
Function
Multidimensional Array
How to make a char string from a C macro's value?
C
C Preprocessor
Dry
Printing pointers in C
C
Pointers
Java - C-Like Fork?
Java
C
Fork
Light C Unicode Library
C
Unicode
Utf 8
Difference between C/C++ Runtime Library and C/C++ Standard Library
C++
C
How to prevent multiple definitions in C?
C
Multiple Definition-Error
Difference between static in C and static in C++??
C++
C
Function pointer as a member of a C struct
C
Function
Pointers
Passing a structure through Sockets in C
C
Sockets
Recv
Sendto
What is the difference between far pointers and near pointers?
C
Pointers
Why does C have a distinction between -> and .?
C
Struct
Can I display the value of an enum with printf()?
C
Printf
Enums
Object oriented programming in C
C
Oop
Why is (void) 0 a no operation in C and C++?
C++
C
Compiler Construction
Cumulative Normal Distribution Function in C/C++
C++
C
Math
Statistics
Distribution
C: socket connection timeout
C
Network Programming
Warning: comparison with string literals results in unspecified behaviour
C
C - How to implement Set data structure?
C
Algorithm
Math
Data Structures
Set
In a C function declaration, what does "..." as the last parameter do?
C
Syntax
Function
Parameters
Finding the centroid of a polygon?
C++
C
Vector
Vector Graphics
Make GNU make use a different compiler
C++
C
Makefile
One-way flight trip problem
C
Algorithm
Declaring and initializing arrays in C
C
Arrays
Initialization
C API design: Who should allocate?
C
Api
Memory Management
Malloc
Why exactly do we need a "Circular Linked List" (singly or doubly) data structure?
C
Data Structures
Linked List
Circular List
CreateProcess: No such file or directory
C
Gcc
Mingw
C/C++: switch for non-integers
C++
C
Switch Statement
In C, are arrays pointers or used as pointers?
C
Arrays
Pointers
Assigning negative numbers to an unsigned int?
C
Is there const in C?
C++
C
Constants
Language Comparisons
How to print variable addresses in C?
C
Pointers
Memory Address
How to remove the character at a given index from a string in C?
C
String
Increment void pointer by one byte? by two?
C++
C
Pointers
How to compile Clang on Windows
C++
C
Windows
Clang
Append Char To String in C?
C
String
Anonymous functions using GCC statement expressions
C
Gcc
Lambda
Anonymous Function
How does malloc work in a multithreaded environment?
C
Linux
Gcc
Malloc
X86 64
How to make an HTTP get request in C without libcurl?
C
Http
Sockets
Networking
Http Headers
Why can two different enum enumeration-constants have the same integer value?
C
Enums
C/C++ int[] vs int* (pointers vs. array notation). What is the difference?
C++
C
Arrays
Pointers
Standards
How clear gdb command screen?
C++
C
Gcc
Gdb
Binutils
C function pointer syntax
C
Declare
undefined reference to curl_global_init, curl_easy_init and other function(C)
C
Curl
Libcurl
Why does rand() + rand() produce negative numbers?
C
Random
Strange definitions of TRUE and FALSE macros
C++
C
Macros
Boolean
Obfuscation
how to find gcc version on mac
C
Macos
Gcc
Dereferencing a pointer to 0 in C
C
Pointers
Memory
Dereference
Can I mimic a C header that redefines bool in C++?
C++
C
Typedef
Mixing
Where is the bluetooth/bluetooth.h located in Linux?
C
Linux
Bluetooth
Ibeacon
Bluez
Alternatives to `while (1)` to simplify branching
C
Can XOR of two integers go out of bounds?
C++
C
Bit Manipulation
Integer Overflow
Bitwise Xor
Why use abs() or fabs() instead of conditional negation?
C++
C
Variables
Negation
Absolute Value
Array-syntax vs pointer-syntax and code generation?
C
Arrays
Pointers
Pointer Arithmetic
Errata
What is a jump table?
C++
C
Memory
Embedded
Undefined Symbol ___gxx_personality_v0 on link
C++
C
Gcc
G++
Is returning a pointer to a static local variable safe?
C
Static
Why do you have to link the math library in C?
C
Compilation
math.h
Arrow operator (->) usage in C
C
Pointers
Syntax
What is double star (eg. NSError **)?
C
Objective C
Cocoa
Pointers
Multiple Indirection
Smart pointers/safe memory management for C?
C
Memory
Pointers
C99
Smart Pointers
Should I explicitly cast malloc()'s return value?
C
Pointers
Casting
getopt does not parse optional arguments to parameters
C
Arguments
Getopt
Getopt Long
Optional Arguments
Conditional operator differences between C and C++
C++
C
Conditional Operator
How to add two numbers without using ++ or + or another arithmetic operator
C++
C
Algorithm
Bit Manipulation
Is it possible to print a preprocessor variable in C?
C
Variables
C Preprocessor
What is the best autocomplete/suggest algorithm,datastructure [C++/C]
C++
C
Algorithm
Search
Autocomplete
How to include a dynamic array INSIDE a struct in C?
C
Pointers
Arrays
Struct
Memory Management
Fastest way to calculate a 128-bit integer modulo a 64-bit integer
C
Algorithm
X86
Modulo
Assembly
Embedding binary blobs using gcc mingw
C
Gcc
Binary
Mingw
C: using clock() to measure time in multi-threaded programs
C
In C99, is f()+g() undefined or merely unspecified?
C
C99
Undefined Behavior
Sequence Points
Unspecified Behavior
C Switch-case curly braces after every case
C
Switch Statement
Pipe buffer size is 4k or 64k?
C
Linux
Size
Buffer
Pipe
How define an array of function pointers in C
C++
C
Arrays
Function Pointers
Zero an array in C code
C
Arrays
Why / when to use `intptr_t` for type-casting in C?
C
Memory Management
Types
Casting
Intptr
C: How do you declare a recursive mutex with POSIX threads?
C
Multithreading
Pthreads
Mutex
Recursive Mutex
Android NDK: getting the backtrace
Android
C++
C
Android Ndk
How to dynamically allocate memory space for a string and get that string from user?
C
String
Memory Management
Malloc
Dynamic
Does readdir() guarantee an order?
C
Readdir
What is the difference between intXX_t and int_fastXX_t?
C
Optimization
Types
Integer
C99
sending blocks of 2D array in C using MPI
C
Parallel Processing
Mpi
Correct way of passing 2 dimensional array into a function
C
Why does NaN - NaN == 0.0 with the Intel C++ Compiler?
C++
C
Floating Point
Ieee 754
Icc
How do malloc() and free() work?
C++
C
Memory Management
Malloc
Free
Is there a REPL for C programming?
C
Read Eval-Print-Loop
What is the difference between memcmp, strcmp and strncmp in C?
C
String
C Strings
How does similar_text work?
Php
Javascript
C
What is the difference between stdin and STDIN_FILENO?
C
String termination - char c=0 vs char c='\0'
C
String
C Strings
Null Terminated
Ansi C
When is it valid to access a pointer to a "dead" object?
C
Pointers
Language Lawyer
Undefined Behavior
What is 'forward declaration' and the difference between 'typedef struct X' and 'struct X'?
C
Struct
Typedef
What's the meaning of the %m formatting specifier?
C
Printf
Glibc
Errno
Format Specifiers
What is the meaning of `struct X typedef` vs. `typedef struct X`?
C++
C
Struct
Visual Studio-2010
Is it mandatory to escape tabulator characters in C and C++?
C++
C
How to printf a memory address in C
C
Pointers
Printf
Memory Address
Unary Operator
Determining to which function a pointer is pointing in C?
C
Function Pointers
"register" keyword in C?
C
Memory
Keyword
Wrapping a C library in Python: C, Cython or ctypes?
Python
C
Ctypes
Cython
Why does glibc's strlen need to be so complicated to run quickly?
C
Optimization
Glibc
Portability
Strlen
Does the C standard permit assigning an arbitrary value to a pointer and incrementing it?
C
Pointers
Language Lawyer
Pointer Arithmetic
How to implement continuations?
C
Lisp
Scheme
Continuations
Getting absolute path of a file
C
Unix
Path
Filesystems
Absolute
Waitpid equivalent with timeout?
C++
C
Linux
Set local environment variables in C++
C++
C
Manpage
building a .so that is also an executable
C
Linux
Shared Libraries
Glibc
Dlopen
Technical reasons behind formatting when incrementing by 1 in a 'for' loop?
Java
C#
C++
C
For Loop
Recommendations for C Profilers?
C
Profiling
Profiler
What do C and Assembler actually compile to?
C++
C
Compiler Construction
Linker
Assembly
Linker error: "linker input file unused because linking not done", undefined reference to a function in that file
C++
C
Gcc
Makefile
Linker Errors
How can I get GDB to tell me what address caused a segfault?
C
Gdb
What is the correct type for array indexes in C?
C
Types
Indexing
C99
Anonymous union within struct not in c99?
C
Gcc
Struct
C99
Unions
Fastest JSON reader/writer for C++
C++
C
Json
How to replicate vector in c?
C
Producing optimised NDK code for multiple architectures?
Android
C
Gcc
Java Native-Interface
Android Ndk
How do I determine the size of my array in C?
C
Arrays
Memory
Purpose of Unions in C and C++
C++
C
Unions
Type Punning
What's the rationale for null terminated strings?
C++
C
String
Null Terminated
Compiler warning - suggest parentheses around assignment used as truth value
C
Compiler Construction
Compiler Warnings
Visual Studio debugger error: Unable to start program Specified file cannot be found
C++
C
Visual Studio-2010
Debugging
Visual C++
What is the difference between prefix and postfix operators?
C
Postfix Operator
Prefix Operator
Why does getpid() return pid_t instead of int?
C
Pid
Type Equivalence
Proper way to empty a C-String
C
String
Strcpy
Type of #define variables
C
C Preprocessor
Reasons to use (or not) stdint
C
Char
Stdint
What's meaning of "EXPORT_SYMBOL" in Linux kernel code?
C
Linux Kernel
Writing robust (color and size invariant) circle detection with OpenCV (based on Hough transform or other features)
C++
Python
C
Opencv
Computer Vision
Arrow Operator vs. Dot Operator
C
Pointers
Structure
How do I print uint32_t and uint16_t variables' value?
C
Gcc
Does C have a string type?
C
String
Char
Printf
Strcpy
error: warning: incompatible implicit declaration of built-in function ‘memcpy’ [enabled by default]
C
Memcpy
function declared static but never defined
C
Gcc Warning
Write-Only pointer type
C++
C
Pointers
Readonly
Const Correctness
Why is it safer to use sizeof(*pointer) in malloc
C
Malloc
How can I measure CPU time and wall clock time on both Linux/Windows?
C++
C
Performance
Time
Cpu
What's the difference between sockaddr, sockaddr_in, and sockaddr_in6?
C++
C
Api
Network Programming
What is the correct printf specifier for printing pid_t
C
Io
Printf
Pid
How to write a simple Linux device driver?
C
Linux
Linux Kernel
Linux Device-Driver
Embedded Linux
Using GCC to produce readable assembly?
C
Gcc
Assembly
munmap_chunk(): invalid pointer
C
How does this float square root approximation work?
C++
C
Optimization
Floating Point
Ieee 754
Is recent GTK 3.22 still Boehm GC friendly (thread issue)?
C
Linux
Multithreading
Gtk
Boehm Gc
Why create an include/ directory in C and C++ projects?
C++
C
Include
C vs C++ compilation incompatibility - does not name a type
C++
C
Gcc
G++
Generate compiler warning if const char* array initialization comma is missing
C
Initialization
Increasing camera capture resolution in OpenCV
C
Image
Opencv
Webcam
Resolutions
Difference between Enum and Define Statements
C++
C
Enums
C Preprocessor
Good tools for creating a C/C++ parser/analyzer
C++
C
Parsing
Yacc
Lex
How to test a static function
C
Unit Testing
sizeof a union in C/C++
C++
C
Sizeof
Unions
How to compare ends of strings in C?
C
String
How do you call Python code from C code?
Python
C
Interop
Cross Domain
zero size malloc
C
Malloc
fast algorithm for drawing filled circles?
C
Algorithm
Graphics
Geometry
How can I see symbols of (C and C++) binary on linux?
C++
C
Performance
Profiling
Name Mangling
What is the >>>= operator in C?
C
Obfuscation
Literals
Bit Shift
Digraphs
malloc vs mmap in C
C
Malloc
Mmap
Does the restrict keyword provide significant benefits in gcc/g++?
C++
C
Gcc
G++
Restrict Qualifier
concatenate char array in C
C
String
Arrays
How to define and work with an array of bits in C?
C
Arrays
Multidimensional Array
Bit Manipulation
Bitarray
What primitive data type is time_t?
C
Types
Printf
Time T
If I do a `typedef` in C or C++, when should I add `_t` at the end of typedef'ed type?
C++
C
Typedef
What is the difference between static and extern in C?
C
how to declare variable type, C style in python
Python
C
Variables
Why C-forkbombs don't work like bash ones?
C++
C
Linux
Bash
Fork
Is C/C++ bool type always guaranteed to be 0 or 1 when typecast'ed to int?
C++
C
Boolean
assert() with message
C
Gcc
Compiler Warnings
Assert
C string append
C
String
Where can I find an official reference listing the operation of SSE intrinsic functions?
C++
C
Gcc
Sse
Simd
Including a header file from another directory
C
Compiler Errors
Include
C Preprocessor
What does y -= m < 3 mean?
C
Use of cudamalloc(). Why the double pointer?
C
Cuda
Malloc
Does gcc define anything when -g is specified?
C
Debugging
Gcc
C Preprocessor
Purpose of LDA argument in BLAS dgemm?
C
Fortran
Blas
What is the difference between str==NULL and str[0]=='\0' in C?
C
Pointers
Gcc
Cstring
Why does C need "struct" keyword and not C++?
C++
C
Compiler Construction
atoi — how to identify the difference between zero and error?
C
Atoi
how to assign multiple values into a struct at once?
C++
C
Struct
Where does the value of CXX in a makefile come from?
C++
C
Makefile
Using C Libraries for C++ Programs
C++
C
Robotics
Difference between angle bracket < > and double quotes " " while including header files in C++?
C++
C
C++11
Is &errno legal C?
C
Language Lawyer
Errno
Fortran vs C++, does Fortran still hold any advantage in numerical analysis these days?
C++
C
Cuda
Fortran
Understanding the difference between f() and f(void) in C and C++ once and for all
C++
C
Function
Void
What does AND 0xFF do?
C
Bit Manipulation
Bitwise Operators
Bit Shift
Is there a way to mark a chunk of allocated memory readonly?
C++
C
Memory Management
Malloc
Heap Corruption
What does it mean to write to stdout in C?
C
Unix
Stdout
Is there a document describing how Clang handles excess floating-point precision?
C
Floating Point
Clang
C99
Extended Precision
What does this expression mean, and why does it compile?
C
Visual C++
getc() vs fgetc() - What are the major differences?
C
Fgetc
Getc
unsigned long long type printing in hexadecimal format
C
Integer
Printf
I do not understand how execlp() works in Linux
C
Linux
Exec
Difference between np.int, np.int_, int, and np.int_t in cython?
Python
C
Numpy
Cython
Why is writing to memory much slower than reading it?
C
Performance
Memory
Hardware
What does the first "c" stand for in "calloc"?
C
Malloc
Libc
Calloc
C Standard-Library
Why is gcc allowed to speculatively load from a struct?
C
Gcc
Assembly
X86
Compiler Optimization
What's the meaning of "reserved for any use"?
C++
C
Language Lawyer
C Standard-Library
Difference between i++ and (i)++ in C
C
Language Lawyer
Increment
Evaluation
Absolute value abs(x) using bitwise operators and Boolean logic
C++
C
Bit Manipulation
Language Lawyer
Absolute Value
Why does this .c file #include itself?
C
C Preprocessor
What is the best free memory leak detector for a C/C++ program and its plug-in DLLs?
C++
C
Visual Studio
Memory Leaks
Octal number literals: When? Why? Ever?
C
Numbers
What does this error mean: "error: expected specifier-qualifier-list before 'type_name'"?
C++
C
Pointers
Struct
How to convert C++ Code to C
C++
C
Code Translation
Stack allocation, padding, and alignment
C
Gcc
Assembly
X86
Stack
In C - check if a char exists in a char array
C
Arrays
String
Char
Are all data pointers the same size in one platform for all data types?
C
Pointers
Types
C/C++, can you #include a file into a string literal?
C++
C
Include
C Preprocessor
String Literals
Why use Macros in C?
C
Macros
What does double underscore ( __const) mean in C?
C
Syntax
Double Underscore
Check double variable if it contains an integer, and not floating point
C++
C
Floating Point
Why is scanf() causing infinite loop in this code?
C
Gcc
Scanf
C Programming: Forward variable argument list
C
Variables
Arguments
Printf
Forward
Remove spaces from a string in C
C
String
Spaces
How can I do a CPU cache flush in x86 Windows?
C
Windows
X86
Cpu
Cpu Cache
Should one really set pointers to `NULL` after freeing them?
C
Pointers
Free
C structure and C++ structure
C++
C
GCC style weak linking in Visual Studio?
C++
C
Visual Studio
Gcc
Weak Linking
Extra leading zeros when printing float using printf?
C++
C
Floating Point
Formatting
Printf
How to format a function pointer?
C
Function Pointers
Embed Text File in a Resource in a native Windows Application
C++
C
Winapi
Resources
Text Files
Should you always use 'int' for numbers in C, even if they are non-negative?
C
Coding Style
`getchar()` gives the same output as the input string
C
Eof
Getchar
How to increase performance of memcpy
C
Visual Studio
Memcpy
Cvi
Memory Bandwidth
Are global variables bad?
C++
C
Global Variables
How to count the number of arguments passed to a function that accepts a variable number of arguments?
C
Variadic Functions
printf string, variable length item
C
Format
Printf
What is __i686.get_pc_thunk.bx? Why do we need this call?
C
Assembly
Shared Libraries
Glibc
In C/C++, is there a directive similar to #ifndef for typedefs?
C++
C
Using WinRT from C?
C
Visual Studio
Winapi
Windows Runtime
Repeated typedefs - invalid in C but valid in C++?
C++
C
Typedef
Language Lawyer
What is the difference between ssize_t and ptrdiff_t?
C
Posix
Which is the best way to get input from user in C?
C
User Input
Warning: array subscript has type char
C
Codeblocks
Double precision - decimal places
C++
C
Precision
Ieee 754
Braces around string literal in char array declaration valid? (e.g. char s[] = {"Hello World"})
C++
C
String
Arrays
Array Initialization
How to get "printf" messages written in NDK application?
Android
C
Android Ndk
Java Native-Interface
Logging
error: function returns address of local variable
C
Return
Strcpy
Strcat
C char* to int conversion
C
Char
Int
Memset Definition and use
C++
C
Function
How to read, understand, analyze, and debug a Linux kernel panic?
C
Linux
Debugging
Linux Kernel
Panic
What does #x inside a C macro mean?
C
Macros
Usage of \b and \r in C
C
My char pointer points to invalid value after being cast from int*
C
Arrays
Pointers
What is -ffreestanding option in gcc?
C
Gcc
Compilation
Freestanding
Why does the string returned by ctime() contain a line feed?
C++
C
String
Time
Std
Write applications in C or C++ for Android?
C++
C
Android
Is bool a native C type?
C
Gcc
Linux Kernel
Boolean
.c vs .cc vs. .cpp vs .hpp vs .h vs .cxx
C++
C
Filenames
Header Files
Naming
How to use hardware acceleration with ffmpeg
C++
C
Ffmpeg
Hardware Acceleration
For { A=a; B=b; }, will "A=a" be strictly executed before "B=b"?
C++
C
Optimization
Compiler Construction
Standards
fatal error: mpi.h: No such file or directory #include <mpi.h>
C++
C
Mpi
Openmpi
Memory Leak Detectors Working Principle
C++
C
Memory Leaks
Getting bool from C to C++ and back
C++
C
Why doesn't GCC optimize structs?
C
Optimization
Gcc
Struct
Your preferred C/C++ header policy for big projects?
C++
C
Coding Style
Include
Header
How to link using GCC without -l nor hardcoding path for a library that does not follow the libNAME.so naming convention?
C++
C
Gcc
Linker
Shared Libraries
Output single character in C
C
Character
String Formatting
XML Parser for C
C
Xml
Parsing
Are prototypes required for all functions in C89, C90 or C99?
C
C99
C89
Material to learn GObject and Glib
C
Gstreamer
Gnome
Glib
Gobject
How to correctly use the extern keyword in C
C
Number of elements in an enum
C
Enums
Bitfield manipulation in C
C
Bit Manipulation
Why is a while loop needed around pthread wait conditions?
C
Multithreading
Pthreads
What is activation record in the context of C and C++?
C++
C
Getting started with Intel x86 SSE SIMD instructions
C
Gcc
X86
Sse
Simd
Difference between LPVOID and void*
C
Cross Platform C library for GUI Apps?
C
User Interface
Qt
Graphics
Cross Platform
Why are drivers and firmwares almost always written in C or ASM and not C++?
C++
C
How do I measure a time interval in C?
C
Timer
Which macro to wrap Mac OS X specific code in C/C++
C++
C
Xcode
Macos
Macros
how to exit a child process - _exit() vs. exit
C
Process
Fork
What can you do in C without "std" includes? Are they part of "C," or just libraries?
C
Standards
ISO/IEC Website and Charging for C and C++ Standards
C++
C
Standards
Iso
Is the C programming language object-oriented?
C
Oop
Standards
How to use netlink socket to communicate with a kernel module?
C
Linux Kernel
Linux Device-Driver
Netlink
How do I measure time in C?
C
Windows
Winapi
Time
Why does left shift operation invoke Undefined Behaviour when the left side operand has negative value?
C++
C
Language Lawyer
Undefined Behavior
Bit Shift
What are the differences between a compiler and a linker?
C
Compiler Construction
Linker
Terminology
Determining sprintf buffer size - what's the standard?
C
Int
Printf
C complex number and printf
C
Printf
Complex Numbers
After forking, are global variables shared?
C
Linux
Unix
Fork
Associative arrays in C
C
Arrays
Associative Array
Dongle
Can the linker inline functions?
C
Optimization
Linker
Inline
Why is a pthread mutex considered "slower" than a futex?
C
Linux
Pthreads
Futex
Is memset() more efficient than for loop in C?
C
Performance
Memset
How to create a C compiler for custom CPU?
C
Compiler Construction
Customization
How to draw text using only OpenGL methods?
C++
C
Opengl
Graphics
What does the question mark and the colon (?: ternary operator) mean in objective-c?
Objective C
C
Syntax
Operators
Conditional Operator
How to prevent SIGPIPEs (or handle them properly)
C
Io
Signals
Broken Pipe
Sigpipe
Check if process exists given its pid
C
Linux
Pid
forward declaration of a struct in C?
C
Struct
Declaration
Forward Declaration
Operation on ... may be undefined?
C
Undefined Behavior
Are char * argv[] arguments in main null terminated?
C
Argv
Null Terminated
Writing a Python extension in Go (Golang)
Python
C
Go
Cython
difference between <stdlib.h> and <malloc.h>
C
Gcc
Malloc
Is this ->> an old operator or a typo/error?
C++
C
Operators
History
what is the reason for explicitly declaring L or UL for long values
C
Constants
What is "!!" in C?
C
Gcc
Boolean
Boolean Expression
Correct printf format specifier for size_t: %zu or %Iu?
C++
C
Visual Studio-2010
Printf
Format Specifiers
Buffer overflow works in gdb but not without it
C
Security
Buffer Overflow
Fortify Source
Memory Safety
What is "..." in switch-case in C code
C
Gcc
Gcc Extensions
How to render text in SDL2?
C
Sdl 2
C empty struct -- what does this mean/do?
C
Struct
What do pty and tty mean?
C
Unix
Networking
Tty
Vocabulary
How to define an enumerated type (enum) in C?
C
Enums
How does C compute sin() and other math functions?
C
Math
Trigonometry
Once upon a time, when > was faster than < ... Wait, what?
C
Optimization
Opengl
Cpu
Gpu
how to use cURL on specific interface
C
Linux
Curl
Different Pointer Arithmetic Results when Taking Address of Array
C
Pointers
Language Lawyer
How does fork() know when to return 0?
C
Unix
Process
Fork
Internals
What does a && operator do when there is no left side in C?
C
Gcc
Goto
Language Extension
Does sscanf("123456789123456789123456789", "%d", &n) have defined behavior?
C
Scanf
Undefined Behavior
What causes a char to be signed or unsigned when using gcc?
C
Gcc
Nonintuitive result of the assignment of a double precision number to an int variable in C
C
Floating Point
Type Conversion
Implicit Conversion
If the size of "long" and "int" are the same on a platform - are "long" and "int" different in any way?
C
Types
Integer
Representation
Why is the gets function so dangerous that it should not be used?
C
Fgets
Buffer Overflow
Gets
Why malloc+memset is slower than calloc?
C
Malloc
The most efficient way to implement an integer based power function pow(int, int)
C
Algorithm
Math
Exponentiation
How do I get the directory that a program is running from?
C++
C
Working Directory
how to use #ifdef with an OR condition?
C
Macros
How to achieve function overloading in C?
C
Overloading
How can I autoformat/indent C code in vim?
C
Vim
Code Formatting
How to disable GCC warnings for a few lines of code
C
Gcc
Compiler Warnings
Pragma
Structure padding and packing
C
Struct
Structure
Padding
Packing
Why do we need C Unions?
C
Unions
What is the "assert" function?
C++
C
Assert
What does opening a file actually do?
C
Linux
What's the difference between __PRETTY_FUNCTION__, __FUNCTION__, __func__?
C++
C
Compiler Construction
Standards
Is there a difference between foo(void) and foo() in C++ or C?
C++
C
Arguments
How to know what the 'errno' means?
C
Linux
Errno
How to avoid "if" chains?
C++
C
If Statement
Control Flow
Is there a Java equivalent or methodology for the typedef keyword in C++?
Java
C++
C
Design Patterns
Typedef
#pragma pack effect
C
C Preprocessor
Pragma Pack
What are the differences between .so and .dylib on macOS?
C++
C
Macos
Unix
How do I use extern to share variables between source files?
C
Global Variables
Extern
uint8_t vs unsigned char
C
Typedef
Is 'switch' faster than 'if'?
C
Performance
Switch Statement
Assembly
Jump Table
What is the difference between char array and char pointer in C?
C
Arrays
Pointers
Significance of ios_base::sync_with_stdio(false); cin.tie(NULL);
C++
C
Difference between fprintf, printf and sprintf?
C
Io
Stream
Printf
Modulo operation with negative numbers
C
Gcc
Modulo
Negative Number
How do I check OS with a preprocessor directive?
C
Operating System
C Preprocessor
Conditional Compilation
Understanding typedefs for function pointers in C
C
Function Pointers
Typedef
What is the behavior of integer division?
C
Math
C99
C89
Integer Division
What does {0} mean when initializing an object?
C++
C
Efficient Algorithm for Bit Reversal (from MSB->LSB to LSB->MSB) in C
C
Algorithm
Bit Manipulation
What is Bit Masking?
C
Bit Manipulation
Bitwise Operators
Terminology
Bitmask
What is exactly the base pointer and stack pointer? To what do they point?
C
Assembly
X86
Stack Frame
Stack Pointer
size_t vs. uintptr_t
C
Pointers
Size T
warning: implicit declaration of function
C
Compiler Warnings
C fopen vs open
C
Linux
File Io
Fopen
How to initialize all members of an array to the same value?
C
Arrays
Initialization
Array Initialize
Why does the C preprocessor interpret the word "linux" as the constant "1"?
C
Linux
Gcc
C Preprocessor
What is the difference between ++i and i++?
C
For Loop
Post Increment
Pre Increment
Execution time of C program
C
Benchmarking
Why is 0 < -0x80000000?
C
Signed
Numeric Limits
Numeric Conversion
Why does GCC use multiplication by a strange number in implementing integer division?
C
Gcc
Assembly
X86 64
Integer Division
How can I suppress "unused parameter" warnings in C?
C
Gcc
Gcc Warning
Is it better to use C void arguments "void foo(void)" or not "void foo()"?
C
Void
Is the sizeof(some pointer) always equal to four?
C++
C
Pointers
Memory
Sizeof
Rounding up to next power of 2
C
Optimization
Bit Manipulation
static const vs #define
C++
C
Constants
Single quotes vs. double quotes in C or C++
C++
C
Syntax
Char
String Literals
Why is unsigned integer overflow defined behavior but signed integer overflow isn't?
C++
C
Undefined Behavior
Integer Overflow
How do I restrict a float value to only two places after the decimal point in C?
C
Floating Point
Decimal
#define macro for debug printing in C?
C
C Preprocessor
How do you compare structs for equality in C?
C
Struct
Equality
Why does this for loop exit on some platforms and not on others?
C
Debugging
Undefined Behavior
Buffer Overflow
Is an array name a pointer?
C
Arrays
Pointers
C read file line by line
C
File Io
Line
Libc
typedef fixed length array
C
Arrays
Gcc
Typedef
printf() formatting for hexadecimal
C
Printf
Hex
What is the Difference Between read() and recv() , and Between send() and write()?
C
Sockets
Unix
Network Programming
Posix
Passing by reference in C
C
Pointers
Pass by-Reference
What exactly is a reentrant function?
C++
C
Recursion
Thread Safety
Reentrancy
Why do function pointer definitions work with any number of ampersands '&' or asterisks '*'?
C++
C
Function Pointers
Correct format specifier to print pointer or address?
C
Pointers
Format
Memory Address
Are memory leaks ever ok?
C++
C
Memory Leaks
What is the difference between AF_INET and PF_INET in socket programming?
C
Linux
Sockets
When to use inline function and when not to use it?
C++
C
Inline
Interview question: Check if one string is a rotation of other string
Java
C++
C
Why is the asterisk before the variable name, rather than after the type?
C
Pointers
Variables
Naming Conventions
close vs shutdown socket?
C
Sockets
Networking
Difference between char* and const char*?
C
Pointers
Constants
How dangerous is it to access an array out of bounds?
C
Arrays
Memory
How to initialize array to 0 in C?
C
Arrays
Initialization
Obfuscated C Code Contest 2006. Please explain sykes2.c
C
Obfuscation
Deobfuscation
What is the difference between a definition and a declaration?
C
Declaration
Terminology
Definition
C++ Faq
How to make child process die after parent exits?
C
Linux
Unix
Process
Fork
Why is conversion from string constant to 'char*' valid in C but invalid in C++
C++
C
String
C++11
Char
Differences between fork and exec
C
Unix
Fork
Exec
Constant pointer vs Pointer to constant
C
Pointers
Constants
Why is C so fast, and why aren't other languages as fast or faster?
C
Performance
How do I properly compare strings in C?
C
String
Strcmp
Post-increment and pre-increment within a 'for' loop produce same output
C++
C
For Loop
Operator Precedence
What does the brk() system call do?
C
Linux
Unix
Memory Management
Brk
Finding current executable's path without /proc/self/exe
C++
C
Linux
Macos
Executable
Do I need to explicitly handle negative numbers or zero when summing squared digits?
C
Forward an invocation of a variadic function in C
C
Variadic
typedef struct vs struct definitions
C
Struct
Typedef
Overloading Macro on Number of Arguments
C
Macros
C Preprocessor
What do the parentheses around a function name mean?
C
Function
Parentheses
How come an array's address is equal to its value in C?
C
Pointers
Arrays
Error "initializer element is not constant" when trying to initialize variable with const
C
Initialization
How do I see a C/C++ source file after preprocessing in Visual Studio?
C++
C
Debugging
Visual Studio-2005
C Preprocessor
How to make a variadic macro (variable number of arguments)
C
G++
C Preprocessor
Variadic
Capture characters from standard input without waiting for enter to be pressed
C++
C
Inputstream
What is time_t ultimately a typedef to?
C
Linux
Types
return statement vs exit() in main()
C++
C
Coding Style
Return
Exit
Can I use a binary literal in C or C++?
C++
C
Binary
Protecting executable from reverse engineering?
C++
C
Obfuscation
Assembly
Why aren't programs written in Assembly more often?
C
Programming Languages
Assembly
What exactly is a C pointer if not a memory address?
C
Pointers
Memory Address
What is the difference between conversion specifiers %i and %d in formatted IO functions (*printf / *scanf)
C++
C
Printf
Scanf
Format Specifiers
Realistic usage of the C99 'restrict' keyword?
C
Gcc
C99
Restrict Qualifier
Unit Testing C Code
C
Unit Testing
Testing
Embedded
What is the strict aliasing rule?
C++
C
Undefined Behavior
Strict Aliasing
Type Punning
Pointer arithmetic for void pointer in C
C
Void Pointers
Pointer Arithmetic
Check substring exists in a string in C
C
String
Is there a good Valgrind substitute for Windows?
C
Windows
Debugging
Memory Leaks
Valgrind
C multi-line macro: do/while(0) vs scope block
C
Macros
Multiline
Return a `struct` from a function in C
C
Valid, but worthless syntax in switch-case?
C
Switch Statement
Language Lawyer
Is assert evil?
C++
C
Error Handling
Go
Assert
Is there a replacement for unistd.h for Windows (Visual C)?
C++
C
Windows
Portability
unistd.h
How are multi-dimensional arrays formatted in memory?
C
Arrays
Memory
Data Structures
Stack Memory
Determine the line of code that causes a segmentation fault?
C++
C
Debugging
Segmentation Fault
Creating your own header file in C
C
Header
Include
Include Guards
C Header
Effects of the extern keyword on C functions
C
Syntax
Standards
Work on a remote project with Eclipse via SSH
C
Eclipse
Ssh
Eclipse Cdt
Remote Debugging
Where are static variables stored in C and C++?
C++
C
Compiler Construction
Is errno thread-safe?
C
Linux
Multithreading
Gcc
Where does gcc look for C and C++ header files?
C
Gcc
Header
How to add a 'or' condition in #ifdef
C++
C
C Preprocessor
Is the size of C "int" 2 bytes or 4 bytes?
C
Int
Byte
What is the difference between printf() and puts() in C?
C
String
Output
Printf
Puts
C state-machine design
C++
C
Architecture
State Machine
Is there a technical reason to use > (<) instead of != when incrementing by 1 in a 'for' loop?
C++
C
For Loop
Objective-C : BOOL vs bool
C
Objective C
Types
Boolean
Why do pthreads’ condition variable functions require a mutex?
C
Pthreads
Mutex
Condition Variable
Convert Python program to C/C++ code?
C++
Python
C
Code Generation
How to get the current directory in a C program?
C
Unix
Working Directory
Mutex example / tutorial?
C++
C
Multithreading
Synchronization
Mutex
Build .so file from .c file using gcc command line
C
Linux
Gcc
Shared Libraries
Improve INSERT-per-second performance of SQLite
C
Performance
Sqlite
Optimization
Why are these constructs using pre and post-increment undefined behavior?
C
Increment
Undefined Behavior
Operator Precedence
Sequence Points
Why use apparently meaningless do-while and if-else statements in macros?
C++
C
C Preprocessor
C++ Faq
Difference between malloc and calloc?
C
Malloc
Calloc
It is more efficient to use if-return-return or if-else-return?
Python
C
Performance
Compiler Construction
Switch statement: must default be the last case?
C
Switch Statement
How can I convert a file pointer ( FILE* fp ) to a file descriptor (int fd)?
C
Linux
Unix
File
Posix
What is &&& operation in C
C++
C
Operators
Compiler Optimization
Gcc Warning
How are GCC and g++ bootstrapped?
C++
C
Compiler Construction
Is inline assembly language slower than native C++ code?
C++
C
Performance
Assembly
C isn't that hard: void ( *( *f[] ) () ) ()
C
Parsing
Pointers
Function Pointers
Void Pointers
What does the comma operator , do?
C
Operators
Comma Operator
How do I trim leading/trailing whitespace in a standard way?
C
String
Whitespace
Trim
What's the difference between size_t and int in C++?
C++
C
Types
Int
Regular expressions in C: examples?
C
Regex
maximum value of int
C++
C
Stl
Limits
Numeric Limits
What is the fastest substring search algorithm?
C
Algorithm
String
Substring
How do I check if an integer is even or odd?
C
Integer
How can I use an array of function pointers?
C
Initialization
Function Pointers
What is the C runtime library?
C
Runtime
Where in memory are my variables stored in C?
C
Memory
Memory Management
Types
How do pointer-to-pointers work in C? (and when might you use them?)
C
Pointers
__FILE__ macro shows full path
C
File
Macros
Path
How to convert integer to string in C?
C
String
Integer
Type Conversion
Programmatically get the cache line size?
C++
C
Caching
Operating System
Systems Programming
Returning an array using C
C
Arrays
Pointers
Char
Catch Ctrl-C in C
C
Signals
Why does scanf() need "%lf" for doubles, when printf() is okay with just "%f"?
C
Scanf
Length Modifiers
What's the difference between “mod” and “remainder”?
C
Math
Operators
What are the differences between poll and select?
C
Unix
Select
Split string with delimiters in C
C
String
Split
fork() branches more than expected?
C++
C
Fork
How do you reverse a string in place in C or C++?
C++
C
String
Reverse
Why does GCC generate such radically different assembly for nearly the same C code?
C
Gcc
Assembly
X86
Compiler Optimization
Can't compile C program on a Mac after upgrade to Mojave
C
Macos
Gcc
Terminal
Is gcc's __attribute__((packed)) / #pragma pack unsafe?
C
Gcc
Pragma Pack
In CMake, how can I test if the compiler is Clang?
C++
C
Cmake
Clang
Using boolean values in C
C
Boolean
What is the idiomatic way in CMAKE to add the -fPIC compiler option?
C++
C
Cmake
Checking for NULL pointer in C/C++
C++
C
If Statement
Null
Coding Style
Why is it considered a bad practice to omit curly braces?
Java
C#
C++
C
Coding Style
How do I define and use an ENUM in Objective-C?
Iphone
Objective C
C
Clang vs GCC for my Linux Development project
C++
C
Linux
Gcc
Clang
Tool to track #include dependencies
C++
C
Header
Is there an alternative sleep function in C to milliseconds?
C
Linux
Sleep
memcpy() vs memmove()
C
Memcpy
Memmove
What does (x ^ 0x1) != 0 mean?
C++
C
Bit Manipulation
Bitmask
What does "Memory allocated at compile time" really mean?
C++
C
Memory
Memory Management
Terminology
How do I set a conditional breakpoint in gdb, when char* x points to a string whose value equals "hello"?
C
Debugging
Gdb
Conditional Breakpoint
What does void* mean and how to use it?
C
Is char signed or unsigned by default?
C
Types
Char
Signed
Is "for(;;)" faster than "while (true)"? If not, why do people use it?
C++
C
Optimization
Readability
Infinite Loop
Why isn't sizeof for a struct equal to the sum of sizeof of each member?
C++
C
Struct
Sizeof
C++ Faq
What should main() return in C and C++?
C++
C
Return Value
Main
Return Type
Warning/error "function declaration isn't a prototype"
C
Gcc
Setting variable to NULL after free
C
Coding Style
Malloc
Free
Heap Memory
String literals: Where do they go?
C
Memory
String Literals
What do people find difficult about C pointers?
C
Pointers
What does "#define _GNU_SOURCE" imply?
C
Posix
Gnu
What's an object file in C?
C
Compilation
Linker
Object Files
Fastest method of screen capturing on Windows
C++
C
Windows
static function in C
C
Static
Why use bzero over memset?
C
Memset
Systems Programming
Are there any downsides to passing structs by value in C, rather than passing a pointer?
C
Struct
Parameter Passing
Abi
What is the worst real-world macros/pre-processor abuse you've ever come across?
C++
C
Macros
Preprocessor
What does void mean in C, C++, and C#?
C#
C++
C
Language Design
Terminology
Why does flowing off the end of a non-void function without returning a value not produce a compiler error?
C++
C
Gcc
G++
How does this code generate the map of India?
C
Obfuscation
What's this =! operator?
C++
C
Operators
What are the most common naming conventions in C?
C
Naming Conventions
Why is volatile not considered useful in multithreaded C or C++ programming?
C++
C
Multithreading
Volatile
C++ Faq
What is a segmentation fault?
C++
C
Segmentation Fault
Const before or const after?
C++
C
Syntax
Constants
How to make clang compile to llvm IR
C
Clang
Llvm
Bitcode
What does i = (i, ++i, 1) + 1; do?
C
Operators
Expression
Compiler Warnings
Comma Operator
How to use the C socket API in C++ on z/OS
C++
C
Sockets
Mainframe
Zos
Error handling in C code
C
Error Handling
Still Reachable Leak detected by Valgrind
C
Pthreads
Valgrind
Does bit-shift depend on endianness?
C
Endianness
A fast method to round a double to a 32-bit int explained
C++
C
Performance
Floating Point
Can num++ be atomic for 'int num'?
C++
C
Multithreading
Assembly
Atomic
Object-orientation in C
C
Oop
Object
How does Duff's device work?
C
Duffs Device
How to get the error message from the error code returned by GetLastError()?
C++
C
Winapi
Get a substring of a char*
C
Char
Substring
Incompatible implicit declaration of built-in function ‘malloc’
C
Struct
Malloc
Why does the indexing start with zero in 'C'?
C
Arrays
What is the advantage of GCC's __builtin_expect in if else statements?
C
Linux
Gcc
Built In
Likely Unlikely
In C++, am I paying for what I am not eating?
C++
C
How can I concatenate twice with the C preprocessor and expand a macro as in "arg ## _ ## MACRO"?
C
Concatenation
Token
C Preprocessor
What is the relation between BLAS, LAPACK and ATLAS
C
Lapack
Blas
Atlas
warning: incompatible implicit declaration of built-in function ‘xyz’
C
Gcc
Gcc Warning
How do you pass a function as a parameter in C?
C
Function
Pointers
Syntax
Parameters
What is size_t in C?
C
Int
Size T
Why do I get this particular color pattern when using rand()?
C
Image
Random
What is a "callback" in C and how are they implemented?
C
Callback
What are the useful GCC flags for C?
C
Gcc
Compiler Flags
What is the purpose of static keyword in array parameter of function like "char s[static 10]"?
C
Arrays
Parameters
Static
What are the GCC default include directories?
C++
C
Linux
Gcc
Include Path
In C, why do some people cast the pointer before freeing it?
C
Pointers
Casting
What is __stdcall?
C
Winapi
Calling Convention
Stdcall
How can I remove a flag in C?
C
Bit Manipulation
Flags
Exotic architectures the standards committees care about
C++
C
Architecture
Why prefer start + (end - start) / 2 over (start + end) / 2 when calculating the middle of an array?
C
Algorithm
How to compile a static library in Linux?
C
Gcc
Static Libraries
Why does "The C Programming Language" book say I must cast malloc?
C
Casting
Malloc
Kernighan and-Ritchie
How do I concatenate two strings in C?
C
String
Why have i++; i--; right after each other?
C
Nmap
Is D a credible alternative to Java and C++?
Java
C++
C
D
How can I compile and run C/C++ code in a Unix console or Mac terminal?
C++
C
Macos
Console
Terminal
C: Run a System Command and Get Output?
C
Linux
System
How do you allow spaces to be entered using scanf?
C
String
Printf
Scanf
Whitespace
Assign one struct to another in C
C
Struct
Write to .txt file?
C
Linux
Significance of -pthread flag when compiling
C++
C
Linux
Pthreads
Why does reading into a string buffer with scanf work both with and without the ampersand (&)?
C
Scanf
Why does pthread_cond_wait have spurious wakeups?
C
Pthreads
Measure time in Linux - time vs clock vs getrusage vs clock_gettime vs gettimeofday vs timespec_get?
C
Linux
Time
Linux Kernel
Why does the smallest int, −2147483648, have type 'long'?
C
Types
How I can print to stderr in C?
C
Printf
Stderr
Is short-circuiting logical operators mandated? And evaluation order?
C++
C
Logical Operators
Short Circuiting
Operator Precedence
Difference between signed / unsigned char
C
Types
Unsigned
What tools are there for functional programming in C?
C
Functional Programming
How do you implement a class in C?
C
Class
Oop
Embedded
_DEBUG vs NDEBUG
C++
C
Debugging
C dynamically growing array
C
Dynamic Arrays
Standard alternative to GCC's ##__VA_ARGS__ trick?
C
C99
C Preprocessor
Variadic Macros
Are the shift operators (<<, >>) arithmetic or logical in C?
C
Binary
Bit Manipulation
Bit Shift
What is the purpose of using -pedantic in the GCC/G++ compiler?
C++
C
Gcc
G++
print call stack in C or C++
C++
C
Linux
Callstack
How to avoid overflow in expr. A * B - C * D
C++
C
Integer Overflow
Why #define TRUE (1==1) in a C boolean macro instead of simply as 1?
C
Precompiler
How can I get the list of files in a directory using C or C++?
C++
C
File
Directory
Speed comparison with Project Euler: C vs Python vs Erlang vs Haskell
Python
C
Performance
Haskell
Erlang
Why is the alphabet split into multiple ranges in this C code?
C++
C
Character
Toupper
How do I find the location of the executable in C?
C++
C
Linux
Unix
Path
How to convert an enum type variable to a string?
C++
C
Preprocessor
Ansi C
bool to int conversion
C++
C
C99
What happens to a declared, uninitialized variable in C? Does it have a value?
C
Initialization
Declaration
How to understand Locality Sensitive Hashing?
C
Machine Learning
Hashmap
Nearest Neighbor
Locality Sensitive-Hash
Where is the itoa function in Linux?
C
Linux
How should I print types like off_t and size_t?
C
Portability
Format Specifiers
C/C++ macro string concatenation
C++
C
C Preprocessor
Call Go functions from C
C
Shared Libraries
Go
Dynamic Linking
How to open, read, and write from serial port in C?
C
Linux
Serial Port
How do you determine the size of a file in C?
C
File
Io
Filesize
C: differences between char pointer and array
C
Arrays
Pointers
In C, do braces act as a stack frame?
C
Memory
Stack
hash function for string
C
Algorithm
Hash
Dictionary
Hashtable
makefile:4: *** missing separator. Stop
C
Makefile
How do I detect unsigned integer overflow?
C++
C
Integer Overflow
NSLog the method name with Objective-C in iPhone
Objective C
C
Iphone
Debugging
What is the meaning of "__attribute__((packed, aligned(4))) "
C
Gcc
A free tool to check C/C++ source code against a set of coding standards?
C++
C
Coding Style
'float' vs. 'double' precision
C
Floating Point
Is it safe to parse a /proc/ file?
C++
C
Linux
Unix
Procfs
Should I return EXIT_SUCCESS or 0 from main()?
C++
C
Return Value
Main
Why is the .bss segment required?
C
Linux
Compiler Construction
How to display a dynamically allocated array in the Visual Studio debugger?
C++
C
Visual Studio
Debugging
What's the point of const pointers?
C++
C
Pointers
Constants
difference between #if defined(WIN32) and #ifdef(WIN32)
C
Is there a way to specify how many characters of a string to print out using printf()?
C++
C
Printf
What does dot (.) mean in a struct initializer?
C
C99
Designated Initializer
constant pointer vs pointer on a constant value
C
Pointers
Constants
~x + ~y == ~(x + y) is always false?
C
Bit Manipulation
Signed
Twos Complement
DESTDIR and PREFIX of make
C
Linux
Bash
Makefile
Configure
Can code that is valid in both C and C++ produce different behavior when compiled in each language?
C++
C
Divide a number by 3 without using *, /, +, -, % operators
C
Math
Division
Divide
How to determine CPU and memory consumption from inside a process
C++
C
Memory
Cpu
Why doesn't this memory eater really eat memory?
C
Linux
Memory
Virtual Memory
What is the difference between sigaction and signal?
C
Signals
Posix
How do I base64 encode (decode) in C?
C
Base64
What is the size of an enum in C?
C
Enums
What is the bit size of long on 64-bit Windows?
C++
C
Windows
64 Bit
Porting
"#include" a text file in a C program as a char[]
C
Include
C Preprocessor
Quick Way to Implement Dictionary in C
C
Data Structures
Dictionary
How are everyday machines programmed?
C
Operating System
Microcontroller
Embedded
Assembly
What's the difference between "static" and "static inline" function?
C
Inline
What is the format specifier for unsigned short int?
C
Scanf
socket connect() vs bind()
C
Sockets
Network Programming
Signed to unsigned conversion in C - is it always safe?
C
Type Conversion
How large should my recv buffer be when calling recv in the socket library
C
Sockets
Buffer
Recv
stdlib and colored output in C
C
Colors
Stdio
Libc
What is the difference between C, C99, ANSI C and GNU C?
C
Gcc
C99
C89
Ansi C
error: Libtool library used but 'LIBTOOL' is undefined
C
Linux
Autotools
Orientdb
Can a recursive function be inline?
C++
C
Compiler Construction
Why was the switch statement designed to need a break?
C
Language Design
How does the C code that prints from 1 to 1000 without loops or conditional statements work?
C
Function Pointers
How can mixed data types (int, float, char, etc) be stored in an array?
C
Arrays
Variant
Mixed Type
Why is this code vulnerable to buffer overflow attacks?
C
Security
Buffer Overflow
Why would anybody use C over C++?
C++
C
Why doesn't C have unsigned floats?
C
Types
Floating Point
Format
Unsigned
How can I tell gcc not to inline a function?
C
Gcc
Inline
Declaring pointers; asterisk on the left or right of the space between the type and name?
C++
C
Pointers
Initializing a struct to 0
C
Struct
Initialization
How do you set, clear, and toggle a single bit?
C++
C
Bit Manipulation
Bitwise Operators
What is the difference between #include <filename> and #include "filename"?
C++
C
Include
Header Files
C Preprocessor
Do I cast the result of malloc?
C
Malloc
Casting
self referential struct definition?
C
Recursion
Struct
Typedef
What is the use of the %n format specifier in C?
C
Printf
Format String
Python (and Python C API): __new__ versus __init__
Python
C
Python C-Api
What does "%.*s" mean in printf?
C
Printf
Format Specifiers
unix domain socket VS named pipes?
C
Linux
Named Pipes
Unix Socket
What is the use of _start() in C?
C
Gcc
Startup
What is the closest thing Windows has to fork()?
C++
C
Windows
Fork
C pointers : pointing to an array of fixed size
C
Pointers
Size
What platforms have something other than 8-bit char?
C++
C
Cross Platform
How to use shared memory with Linux in C
C
Linux
Fork
Shared Memory
What do numbers using 0x notation mean?
C
Integer
Hex
Notation
What is the proper #include for the function 'sleep()'?
C
Posix
Sleep
What is the purpose of a single pound/hash sign (#) on its own line in the C/C++ preprocessor?
C++
C
Boost
C Preprocessor
Can we write comments within variable names?
C
Lexical Analysis
Is it feasible to compile Python to machine code?
Python
C
Linker
Compilation
Is it safe to use -1 to set all bits to true?
C++
C
Binary
Bit Fields
Using scanf() in C++ programs is faster than using cin?
C++
C
Performance
Io
Convert objective-c typedef to its string equivalent
C
Objective C
Enums
Typedef
What can be the reasons of connection refused errors?
C
Sockets
Connection Refused
Are negative array indexes allowed in C?
C
Arrays
Why am I getting "undefined reference to sqrt" error even though I include math.h header?
C
Linker
Linker Errors
Libm
what is Segmentation fault (core dumped)?
C
When would anyone use a union? Is it a remnant from the C-only days?
C++
C
Unions
LLVM vs clang on OS X
C++
C
Gcc
Llvm
Clang
Why does C++ rand() seem to generate only numbers of the same order of magnitude?
C++
C
Math
Random
Pointer expressions: *ptr++, *++ptr and ++*ptr
C++
C
Pointers
Increment
How do I make an infinite empty loop that won't be optimized away?
C
Clang
Language Lawyer
Compiler Optimization
Bubble sort slower with -O3 than -O2 with GCC
C
Gcc
X86 64
Cpu Architecture
Compiler Optimization
How to measure time in milliseconds using ANSI C?
C
Portability
Time Precision
When and why will a compiler initialise memory to 0xCD, 0xDD, etc. on malloc/free/new/delete?
C++
C
Memory
Memory Management
What is the fastest/most efficient way to find the highest set bit (msb) in an integer in C?
C
Algorithm
Optimization
Bit Manipulation
Why write 1,000,000,000 as 1000*1000*1000 in C?
Objective C
C
Integer
Literals
What is the purpose of an 'if (0)' block in if-else block?
C
If Statement
how does array[100] = {0} set the entire array to 0?
C++
C
Compiler Construction
Static variable inside of a function in C
C
Static
C char array initialization
C
Arrays
Char
Initialization
Buffer
How to call C from Swift?
C
Swift
What is the benefit of terminating if … else if constructs with an else clause?
C
Misra
Safety Critical
What is more efficient? Using pow to square or just multiply it with itself?
C++
C
Optimization
Why does ENOENT mean "No such file or directory"?
C
Linux
Unix
How to generate a random int in C?
C
Random
Why are #ifndef and #define used in C++ header files?
C++
C
C Preprocessor
"static const" vs "#define" vs "enum"
C
Constants
Why is “while ( !feof (file) )” always wrong?
C
File
While Loop
Eof
Feof
How do I pass a command line argument while starting up GDB in Linux?
C
Linux
Debugging
Gdb
Command Line-Arguments
Difference between size_t and unsigned int?
C
Types
Unsigned
Pointer to pointer clarification
C
Pointers
Is using an outdated C compiler a security risk?
C
Security
Gcc
Writing programs to cope with I/O errors causing lost writes on Linux
C
Linux
Linux Kernel
Posix
Hidden features of C
C
Hidden Features
Variable declaration placement in C
C
Declaration
C89
Left-pad printf with spaces
C
Formatting
Printf
Getting GDB to save a list of breakpoints
C++
C
Debugging
Gdb
Breakpoints
Where do I find the definition of size_t?
C++
C
Variables
What happens if I define a 0-size array in C/C++?
C++
C
Arrays
How to explain C pointers (declaration vs. unary operators) to a beginner?
C
Pointers
What can I use for input conversion instead of scanf?
C
Scanf
What is the difference between exit() and abort()?
C++
C
Error Handling
Exit
Abort
How do I make a simple makefile for gcc on Linux?
C
Gcc
Makefile
C/C++ maximum stack size of program on mainstream OSes
C++
C
Operating System
Stack Memory
Does free(ptr) where ptr is NULL corrupt memory?
C
Pointers
Memory Management
Null
Free
Are parallel calls to send/recv on the same socket valid?
C
Networking
Sockets
What's the point of malloc(0)?
C
Malloc
Cast to int vs floor
C++
C
Floating Point
What does it mean for a data structure to be "intrusive"?
C++
C
Language Agnostic
Data Structures
Terminology
C/C++ NaN constant (literal)?
C++
C
Nan
Printf width specifier to maintain precision of floating-point value
C
Floating Point
Printf
C99
Floating Point-Precision
Why does C++11 not support designated initializer lists as C99?
C++
C
C++11
Initialization
C99
Why is C++ initial allocation so much larger than C's?
C++
C
Benchmarking
Easiest way to flip a boolean value?
C++
C
Boolean
Boolean Logic
const char* concatenation
C++
C
String Concatenation
Why does printf not flush after the call unless a newline is in the format string?
C
Printf
Flush
What does "dereferencing" a pointer mean?
C++
C
Pointers
Dereference
Difference between static and shared libraries?
C++
C
Shared Libraries
Static Libraries
How to work with complex numbers in C?
C
Complex Numbers
How to remove unused C/C++ symbols with GCC and ld?
C++
C
Gcc
Ld
Strip
How to printf uint64_t? Fails with: "spurious trailing ‘%’ in format"
C++
C
Why can't C functions be name-mangled?
C++
C
Name Mangling
Extern C
Including one C source file in another?
C
Include
C Preprocessor
Code Organization
Project Organization
Detect if stdin is a terminal or pipe?
C++
C
Qt
Pipe
Stdin
Difference between CC, gcc and g++?
C++
C
Gcc
Compilation
#include in .h or .c / .cpp?
C++
C
What is uint_fast32_t and why should it be used instead of the regular int and uint32_t?
C++
C
Types
Signal handling with multiple threads in Linux
C
Linux
Multithreading
Signals
Ipc
Why does "sizeof(a ? true : false)" give an output of four bytes?
C
Boolean
Sizeof
Conditional Operator
C11
What does 'const static' mean in C and C++?
C++
C
Most tricky/useful commands for gdb debugger
C
Unix
Gdb
Debugging
Dbx
Are typedef and #define the same in c?
C
Macros
C Preprocessor
Typedef
What's the difference between a file descriptor and file pointer?
C
File Descriptor
File Pointer
How can I throw an exception in C?
C
Exception
Syntax
Windows threading: _beginthread vs _beginthreadex vs CreateThread C++
C++
C
Multithreading
Winapi
Position of least significant bit that is set
C++
C
Optimization
Bit Manipulation
Python ? (conditional/ternary) operator for assignments
Python
C
Language Features
What is normalized UTF-8 all about?
Php
C
Unicode
Unicode Normalization
Why are function pointers and data pointers incompatible in C/C++?
C++
C
Pointers
Function Pointers
What's the meaning of exception code "EXC_I386_GPFLT"?
C++
C
Exc Bad-Access
What's the use of do while(0) when we define a macro?
C
Macros
Linux Kernel
FFmpeg C API documentation/tutorial
C
Ffmpeg
Documentation
"int main (vooid)"? How does that work?
C
Syntax
Main
GCC -g vs -g3 GDB Flag: What is the Difference?
C
Debugging
Gcc
Gdb
Clang
Why do C and C++ compilers allow array lengths in function signatures when they're never enforced?
C++
C
Arrays
Can't understand this way to calculate the square of a number
C
Arrays
Pointers
C99
Variable Length-Array
How does this piece of code determine array size without using sizeof( )?
C
Arrays
Size
Language Lawyer
Pointer Arithmetic
What is your favorite C programming trick?
C
What is the difference between memmove and memcpy?
C
Memcpy
Memmove
Is it faster to count down than it is to count up?
C
Performance
Loops
Why does integer overflow on x86 with GCC cause an infinite loop?
C++
C
Gcc
X86
Undefined Behavior
Undefined reference to `pow' and `floor'
C
Gcc
Undefined Reference
What is the meaning of the term arena in relation to memory?
C++
C
Memory Management
Terminology
Creating a daemon in Linux
C
Linux
Daemon
In C/C++ what's the simplest way to reverse the order of bits in a byte?
C++
C
Bit Manipulation
Why doesn't c = a+++++b work in C?
C
What is a "static" function in C?
C
Function
Static
Terminology
Undefined, unspecified and implementation-defined behavior
C++
C
Undefined Behavior
Unspecified Behavior
Implementation Defined-Behavior
What REALLY happens when you don't free after malloc before program termination?
C
Malloc
Free
How to pass macro definition from "make" command line arguments (-D) to C source code?
C
Macros
Makefile
Why can't (or doesn't) the compiler optimize a predictable addition loop into a multiplication?
C
Performance
Compiler Optimization
Concept of void pointer in C programming
C
Void Pointers
How to prevent gcc optimizing some statements in C?
C
Gcc
Why declare a struct that only contains an array in C?
C
Arrays
Coding Style
Struct
Difference between int32, int, int32_t, int8 and int8_t
C
Int
Declaration
In release mode, code behavior is not as expected
C++
C
Optimization
Visual Studio-2008
Compiler Bug
Creating C formatted strings (not printing them)
C
String
Passing command line arguments in Visual Studio 2010?
C
Visual Studio-2010
Visual Studio
Command Line-Arguments
Can gcc output C code after preprocessing?
C
C Preprocessor
Preprocessor
Preprocessor Directive
Where is PATH_MAX defined in Linux?
C
Linux
Gcc
Include
Clang
How does the below program output `C89` when compiled in C89 mode and `C99` when compiled in C99 mode?
C
Printf
Comments
C99
C89
Why is a simple loop optimized when the limit is 959 but not 960?
C
Gcc
Optimization
Clang
Possible GCC bug when returning struct from a function
C
Gcc
Assembly
X86 64
Compiler Bug
How to declare a structure in a header that is to be used by multiple files in c?
C
File
Header
Structure
Inline functions vs Preprocessor macros
C++
C
Macros
Inline
Returning a C string from a function
C
Which is faster: while(1) or while(2)?
C
Performance
While Loop
What is the printf format specifier for bool?
C++
C
Boolean
Printf
How do I lowercase a string in C?
C
String
Lowercase
Turn a simple socket into an SSL socket
C
Linux
Sockets
Unix
Ssl
Parsing command-line arguments in C
C
Command Line-Arguments
Try catch statements in C
C
What's the need of array with zero elements?
C
Structure
Flexible Array-Member
C compiler for Windows?
C
Windows
Compiler Construction
Should I learn C before learning C++?
C++
C
Convert a character digit to the corresponding integer in C
C
Type Conversion
Create a pointer to two-dimensional array
C
Arrays
Pointers
Set breakpoint in C or C++ code programmatically for gdb on Linux
C++
C
Linux
Gdb
Transform hexadecimal information to binary using a Linux command
C
Command
Command Line-Arguments
Binaryfiles
Hexdump
How do you make an array of structs in C?
C
Arrays
Struct
Why does Clang optimize away x * 1.0 but NOT x + 0.0?
C++
C
Optimization
Floating Point
Clang
Why does sizeof(my_arr)[0] compile and equal sizeof(my_arr[0])?
C
Sizeof
Is there a typical state machine implementation pattern?
C
Design Patterns
Finite Automata
'const int' vs. 'int const' as function parameters in C++ and C
C++
C
Constants
How to read the content of a file to a string in C?
C
String
File
Build a simple HTTP server in C
C
Httpserver
Finding duplicates in O(n) time and O(1) space
C++
C
Algorithm
":" (colon) in C struct - what does it mean?
C++
C
Spinlock versus Semaphore
C++
C
Linux
Unix
Operating System
Use of #pragma in C
C
Pragma
Avoid trailing zeroes in printf()
C
Printf
Should I use char** argv or char* argv[]?
C
Arrays
Pointers
Standards
How does strtok() split the string into tokens in C?
C
String
Split
Token
Strtok
Difference between passing array and array pointer into function in C
C
Arrays
Function
Parameter Passing
Space Efficiency
How to do scanf for single char in C
C
Char
Scanf
Why does auto a=1; compile in C?
C
Auto
C11
Quickly find whether a value is present in a C array?
C
Optimization
Assembly
Embedded
Arm
Is using if (0) to skip a case in a switch supposed to work?
C++
C
If Statement
Switch Statement
Language Lawyer
How do I fix "for loop initial declaration used outside C99 mode" GCC error?
C
Gcc
For Loop
What is the difference between vmalloc and kmalloc?
C
Linux Kernel
Kmalloc
Vmalloc
Where is C not a subset of C++?
C++
C
How do I get bit-by-bit data from an integer value in C?
C
Bit Manipulation
How is a CRC32 checksum calculated?
C
Checksum
Crc32
Why is address zero used for the null pointer?
C++
C
Memory
Pointers
C/C++ line number
C++
C
C Preprocessor
Line Numbers
Dynamic Compilation
How can one see content of stack with GDB?
C
Assembly
Gdb
make: Nothing to be done for `all'
C
Makefile
Compile error: "g++: error trying to exec 'cc1plus': execvp: No such file or directory"
Php
C++
C
Linux
Gcc
How do you detect/avoid Memory leaks in your (Unmanaged) code?
C++
C
Memory Leaks
#ifdef vs #if - which is better/safer as a method for enabling/disabling compilation of particular sections of code?
C++
C
If Statement
Coding Style
C Preprocessor
Are there any open source C libraries with common data structures?
C
Data Structures
Retrieve filename from file descriptor in C
C
Linux
File
File Descriptor
C compile error: "Variable-sized object may not be initialized"
C
Compiler Errors
Initializer List
Variable Length-Array
sizeof single struct member in C
C
Struct
Sizeof
How to tell where a header file is included from?
C++
C
Gcc
Include
G++
How exactly does tail recursion work?
C
Algorithm
Recursion
Tail Recursion
Does C have a "foreach" loop construct?
C
Foreach
What does -fPIC mean when building a shared library?
C++
C
Gcc
Fpic
Rolling median algorithm in C
C
Algorithm
R
Statistics
Median
What is the difference between signed and unsigned int
C
Unsigned Integer
Signed Integer
GDB corrupted stack frame - How to debug?
C
Recursion
Gdb
Practical usage of setjmp and longjmp in C
C
Setjmp
Difference between *ptr += 1 and *ptr++ in C
C
Pointers
Post Increment
Why does rand() repeat numbers far more often on Linux than Mac?
C
Linux
Macos
Random
What integer hash function are good that accepts an integer hash key?
C
Algorithm
Hash
Do threads have a distinct heap?
C
Windows
Linux
Multithreading
Stack
How many GCC optimization levels are there?
C
Optimization
Gcc
Compiler Construction
Where is the C auto keyword used?
C
What belongs in an educational tool to demonstrate the unwarranted assumptions people make in C/C++?
C++
C
Cross Platform
Portability
How is malloc() implemented internally?
C
Memory
Malloc
System Calls
Sbrk
Undefined reference to pow( ) in C, despite including math.h
C
Calling C/C++ from Python?
C++
Python
C
Fastest way to check if a file exists using standard C++/C++11,14,17/C?
C++
C
File
Stream
C++ preprocessor __VA_ARGS__ number of arguments
C++
C
C Preprocessor
Variadic Macros
Should struct definitions go in .h or .c file?
C
Header
Struct
Why does this code segfault on 64-bit architecture but work fine on 32-bit?
C
Pointers
Segmentation Fault
How to read a line from the console in C?
C
Io
Console
Stdin
What would be C++ limitations compared C language?
C++
C
Why cast unused return values to void?
C++
C
Void
Generate random numbers following a normal distribution in C/C++
C++
C
Random
Distribution
Normal Distribution
Linux: is there a read or recv from socket with timeout?
C
Linux
Sockets
Tcp
Get the current time in C
C
Time
Time T
Localtime
scanf() leaves the newline character in the buffer
C
Scanf
How to break out of nested loops?
C
Nested Loops
Break
When should I use perror("...") and fprintf(stderr, "...")?
C
Stderr
How far can memory leaks go?
C++
C
Memory
Memory Leaks
Why do I get "a label can only be part of a statement and a declaration is not a statement" if I have a variable that is initialized after a label?
C
Gcc
C/C++ check if one bit is set in, i.e. int variable
C++
C
Bit Manipulation
In C, how should I read a text file and print all strings
C
File
Text Files
Using printf with a non-null terminated string
C
String
Format
Printf
Where to put include statements, header or source?
C
Header
Include
Redefining NULL
C
Null
What does the ??!??! operator do in C?
C
Operators
Trigraphs
Comma in C/C++ macro
C++
C
Macros
C Preprocessor
Why do we need argc while there is always a null at the end of argv?
C++
C
Main
C programming in Visual Studio
C
Visual Studio
Declaring variables inside a switch statement
Objective C
C
Variables
Switch Statement
Declaration
Multiple arguments to function called by pthread_create()?
C
Pthreads
Coding Practices which enable the compiler/optimizer to make a faster program
C++
C
Performance
Optimization
How to generate a random integer number from within a range
C
Random
Is the "struct hack" technically undefined behavior?
C
Undefined Behavior
C89
CMake unable to determine linker language with C++
C++
C
Cmake
What does ## (double hash) do in a preprocessor directive?
C++
C
Concatenation
C Preprocessor
C library function to perform sort
C
Sorting
Is "argv[0] = name-of-executable" an accepted standard or just a common convention?
C++
C
Standards
Argv
Color text in terminal applications in UNIX
C
Unix
Terminal
Can I call memcpy() and memmove() with "number of bytes" set to zero?
C++
C
Pointers
Memcpy
Memmove
Undefined reference to `sin`
C
Math
Linker Errors
Undefined Reference
Printing hexadecimal characters in C
C
Hex
Printf
How to increment a pointer address and pointer's value?
C
Pointers
How to declare strings in C
C
Reset C int array to zero : the fastest way?
C++
C
Arrays
Memset
What is the argument for printf that formats a long?
C
Printf
Long Integer
How do I list the symbols in a .so file
C++
C
Gcc
Symbols
Name Mangling
Correct format specifier for double in printf
C
Floating Point
Printf
Double
Format Specifiers
Why are the fast integer types faster than the other integer types?
C++
C
Performance
Types
Int
C99 stdint.h header and MS Visual Studio
C++
C
Visual Studio
C99
What should I do if two libraries provide a function with the same name generating a conflict?
C
Conflict
Name Collision
Creating C macro with ## and __LINE__ (token concatenation with positioning macro)
C
Macros
Concatenation
Token
What predefined macro can I use to detect clang?
C
Macros
Clang
C Preprocessor
printf format specifiers for uint32_t and size_t
C
Printf
Is there a function to copy an array in C/C++?
C++
C
Arrays
C - function inside struct
C
Function
Struct
Freaky way of allocating two-dimensional array?
C
Arrays
Multidimensional Array
Malloc
Allocation
Why doesn't the compiler report a missing semicolon?
C
Freeform
opengl: glFlush() vs. glFinish()
C++
C
Opengl
Graphics
How to send a simple string between two programs using pipes?
C
Unix
Pipe
Why main does not return 0 here?
C
Linux
Return
Main
How to compile without warnings being treated as errors?
C
Gcc
Compiler Warnings
What is the difference between char s[] and char *s?
C
String
Char
Constants
How to initialize a struct in accordance with C programming language standards
C
Struct
Initialization
Placement of the asterisk in pointer declarations
C++
C
Pointers
Declaration
Using C++ library in C code
C++
C
Gcc
Glibc
Best practices for circular shift (rotate) operations in C++
C++
C
Rotation
Bit Manipulation
C++ Faq
Indenting #defines
C
C Preprocessor
Indentation
Code Formatting
Read/write files within a Linux kernel module
C
File Io
Linux Kernel
Kernel Module
How can I tell if a library was compiled with -g?
C
Debugging
Gdb
Debug Symbols
Using continue in a switch statement
C++
C
Switch Statement
Break
Continue
How to list files in a directory in a C program?
C
Linux
Is unsigned integer subtraction defined behavior?
C
Standards
Unsigned
Integer Arithmetic
How to solve "ptrace operation not permitted" when trying to attach GDB to a process?
C
Linux
Debugging
Gdb
Strace
How to get thread id of a pthread in linux c program?
C
Linux
Pthreads
How are C data types “supported directly by most computers”?
C
clearing a char array c
C
Arrays
Char
How can I build a small operating system on an old desktop computer?
C
Operating System
Bootstrapping
Osdev
Assembly
Why do I get a warning every time I use malloc?
C
Gcc
Malloc
Warnings
Sizeof
How to reverse a singly linked list using only two pointers?
C
Algorithm
Data Structures
Linked List
Singly Linked-List
Macro definition to determine big endian or little endian machine?
C
Architecture
Macros
C Preprocessor
Endianness
Algorithm to convert RGB to HSV and HSV to RGB in range 0-255 for both
C++
C
Algorithm
Which one will execute faster, if (flag==0) or if (0==flag)?
C++
C
Are default enum values in C the same for all compilers?
C
Enums
unsigned int vs. size_t
C++
C
Size T
Convert char to int in C and C++
C++
C
Gcc
Is ‘int main;’ a valid C/C++ program?
C++
C
Function
Main
Entry Point
What is a trampoline function?
C
Language Agnostic
Programming Languages
Trampolines
Tools to get a pictorial function call graph of code
C
Function
Call Graph
Why isn't the size of an array parameter the same as within main?
C
Arrays
Function
Sizeof
What does -D_XOPEN_SOURCE do/mean?
C
Gcc
Reading string from input with space character?
C
String
Input
Scanf
Whitespace
The "backspace" escape character '\b': unexpected behavior?
C
Language Agnostic
Printf
Special Characters
Backspace
Difference between static memory allocation and dynamic memory allocation
C
Memory
Memory Management
Dynamic Memory-Allocation
Static Memory-Allocation
Macro vs Function in C
C
Function
C Preprocessor
How to convert enum names to string in c
C
String
Enums
Will strlen be calculated multiple times if used in a loop condition?
C++
C
Gcc
Optimization
Strlen
Why does c = ++(a+b) give compilation error?
C
Increment
Why is "a" != "a" in C?
C
String
Passing an array as an argument to a function in C
C
Arrays
Function
Parameters
Parameter Passing
Creating a new directory in C
C
Linux
Directory
error: unknown type name ‘bool’
C
Gcc
Lex
Debug vs Release in CMake
C++
C
Gcc
Cmake
Simple C example of doing an HTTP POST and consuming the response
C
Http
Http Post
Why don't two binaries of programs with only comments changed exactly match in gcc?
C
Gcc
Optimization
Binary Reproducibility
Is there an interpreter for C?
C
Interpreter
Read Eval-Print-Loop
Getting terminal width in C?
C
Linux
Terminal
Width
When you exit a C application, is the malloc-ed memory automatically freed?
C
Memory Management
C libcurl get output into a string
C
Libcurl
How to compare strings in C conditional preprocessor-directives
C
Conditional
C Preprocessor
Static assert in C
C
Gcc
Assert
Compile Time
Static Assert
rails install pg - Can't find the 'libpq-fe.h header
C
Ruby on-Rails
Sqlite
Ruby on-Rails-3
Pg
Why are C character literals ints instead of chars?
C++
C
Char
Sizeof
How to write log base(2) in c/c++
C++
C
What's the difference between hard and soft floating point numbers?
C
Linux
Floating Point
Arm
Libc
Please explain the exec() function and its family
C
Unix
Execl
Programmatically find the number of cores on a machine
C++
C
Multithreading
Multiplatform
Typedef function pointer?
C++
C
Pointers
Typedef
How would one write object-oriented code in C?
C
Oop
Object
What is the fastest integer division supporting division by zero no matter what the result is?
C++
C
Optimization
Divide by-Zero
Map a 2D array onto a 1D array
C
Arrays
Multidimensional Array
How to track down a "double free or corruption" error
C++
C
Debugging
Free
How can I use "sizeof" in a preprocessor macro?
C
Gcc
Why doesn't ANSI C have namespaces?
C
Namespaces
Ansi C
'uint32_t' identifier not found error
C++
C
Visual C++
Is "inline" without "static" or "extern" ever useful in C99?
C
Inline
C99
Is C notably faster than C++
C++
C
Performance
default value for struct member in C
C
Struct
What's the best way to do a backwards loop in C/C#/C++?
C#
C++
C
What function is to replace a substring from a string in C?
C
String
Replace
Fixed-size floating point types
C++
C
Boost
Floating Point
How to print time in format: 2009‐08‐10 18:17:54.811
C
Time
How to make an OpenGL rendering context with transparent background?
C
Winapi
Opengl
Transparency
The tilde operator in C
C++
C
Operators
Why does sizeof(x++) not increment x?
C
Sizeof
What's the best way to check if a file exists in C?
C
Filesystems
Cross Platform
Is there a printf converter to print in binary format?
C
Printf
What is this "[0 ... 255] =" syntax in C?
C
Gcc Extensions
Learn C first before learning Objective-C
C
Objective C
Cocoa
How to format strings using printf() to get equal length in the output
C
String
Printf
Pretty Print
snprintf and Visual Studio 2010
C
Visual Studio-2010
What is the difference between exit and return?
C
Return
Exit
Mapping a numeric range onto another
C
Math
Arduino
What is the difference between exit(0) and exit(1) in C?
C
What is the significance of initializing direction arrays below with given values when developing chess program?
C++
C
Chess
GCC fatal error: stdio.h: No such file or directory
C
Gcc
Stdio
(A + B + C) ≠ (A + C + B) and compiler reordering
C++
C
Compiler Construction
Integer Overflow
Is it legal to index into a struct?
C++
C
Struct
Can a 'for' loop inside of a 'for' loop use the same counter variable name?
C
Loops
For Loop
Nested
Timer function to provide time in nano seconds using C++
C++
C
Timer
What is the rationale for fread/fwrite taking size and count as arguments?
C
File Io
Libc
Casting a function pointer to another type
C
Function Pointers
Use of exit() function
C
Nested function in C
C
Function
Nested
What is CHAR_BIT?
C
Bit Manipulation
Concatenate int to string using C Preprocessor
C
C Preprocessor
Stringification
What is an unsigned char?
C++
C
Char
What are .a and .so files?
C
Unix
Compilation
Shared Libraries
.A
Ask GDB to list all functions in a program
C
Linux
Gcc
Gdb
X86 64
gcc/g++: "No such file or directory"
C++
C
Gcc
G++
C++ Faq
This source code is switching on a string in C. How does it do that?
C
Switch Statement
Label
Constants
Why is a segmentation fault not recoverable?
C++
C
Exception
Segmentation Fault
Are there machines, where sizeof(char) != 1, or at least CHAR_BIT > 8?
C
Char
Standards
Sizeof
C99
What is the fastest way to compute sin and cos together?
C#
C++
C
Algorithm
Math
Where did the name `atoi` come from?
C
Naming Conventions
Atoi
'do...while' vs. 'while'
C#
C++
C
While Loop
Do While
Are types like uint32, int32, uint64, int64 defined in any stdlib header?
C
Libc
What does __init mean in the Linux kernel code?
C
Linux
How does one represent the empty char?
C
Why is printf with a single argument (without conversion specifiers) deprecated?
C
Security
Printf
Format Specifiers
Puts
Confusion about array initialization in C
C
Arrays
Initialization
Language Lawyer
Why is sizeof considered an operator?
C
Operators
Sizeof
Is there a performance difference between i++ and ++i in C?
C
Performance
Optimization
Post Increment
Pre Increment
How to set up a cron job to run an executable every hour?
C
Linux
Gcc
Cron
Crontab
Initialize/reset struct to zero/null
C
Struct
Initialization
"Unresolved inclusion" error with Eclipse CDT for C standard library headers
C
Eclipse
Eclipse Cdt
Standard Library
Make a program run slowly
C++
C
Linux
Unix
Ubuntu
Call a C function from C++ code
C++
C
Linux
Extern C
Why does everybody typedef over standard C types?
C++
C
Stdint
How to set breakpoints on future shared libraries with a command flag
C++
C
Linux
Unix
Gdb
What does extern inline do?
C++
C
Extern
Inline Functions
convert big endian to little endian in C [without using provided func]
C
Swap
Endianness
What is the difference between fork and thread?
C
Process
Multithreading
Fork
How can I compare strings in C using a `switch` statement?
C
String
Switch Statement
String Comparison
Why do most C developers use define instead of const?
C
Coding Style
C Preprocessor
Why cast an unused function parameter value to void?
C
Casting
Void
What does && mean in void *p = &&abc;
C++
C
Gcc
Operators
gdb: "No symbol table is loaded"
C
Gdb
What are vdso and vsyscall?
C
Linux
Linux Kernel
Kernel
Vdso
Does "Undefined Behavior" really permit *anything* to happen?
C++
C
Language Lawyer
Undefined Behavior
Preventing console window from closing on Visual Studio C/C++ Console application
C
Visual Studio
Console
When is assembly faster than C?
C
Performance
Assembly
What is the difference between float and double?
C++
C
Floating Point
Precision
Ieee 754
Why are hexadecimal numbers prefixed with 0x?
C
Syntax
Hex
Undefined reference to pthread_create in Linux
C
Linux
Multithreading
Pthreads
Implicit type promotion rules
C
Type Conversion
Implicit Conversion
Valid use of goto for error management in C?
C
Exception Handling
Error Handling
Goto
What is the purpose of fork()?
C
Unix
Posix
Fork
minimum double value in C/C++
C++
C
Math
what is the unsigned datatype?
C
Types
Unsigned
How to empty a char array?
C
Arrays
Char
Why do I get a C malloc assertion failure?
C
Gcc
Malloc
Assertion
Switch statement with returns -- code correctness
C
Switch Statement
Correctness
How to check if a string starts with another string in C?
C
String
Comparison
Startswith
What does [ N ... M ] mean in C aggregate initializers?
C
Linux
Kernel
PTHREAD_MUTEX_INITIALIZER vs pthread_mutex_init ( &mutex, param)
C
Ubuntu
Pthreads
Mutex
Understanding INADDR_ANY for socket programming
C
Sockets
What is the purpose of the RBP register in x86_64 assembler?
C
Assembly
X86 64
Stack Pointer
Unexpected exec permission from mmap when assembly files included in the project
C
Linux
Assembly
Mmap
Dep
In C can a long printf statement be broken up into multiple lines?
C
Printf
Why do you not use C for your web apps?
Php
C
Web Applications
Regarding 'main(int argc, char *argv[])'
C
Argv
Argc
How did this person code "Hello World" with Microsoft Paint?
C++
C
Paint
How do you convert a byte array to a hexadecimal string in C?
C
String
Hex
How can I create a Makefile for C projects with SRC, OBJ, and BIN subdirectories?
C
Makefile
How to clear input buffer in C?
C
Buffer
What is the effect of extern "C" in C++?
C++
C
Linkage
Name Mangling
Extern C
Why should we typedef a struct so often in C?
C
Struct
Typedef
Why is volatile needed in C?
C
Declaration
Volatile
C pointer to array/array of pointers disambiguation
C
Arrays
Pointers
Variable Declaration
Why sizeof int is wrong, while sizeof(int) is right?
C++
C
Sizeof
GDB: break if variable equal value
C
Gdb
malloc for struct and pointer in C
C
Memory Management
How to use SCNetworkReachability in Swift
Ios
C
Struct
Swift
Reachability
Unions and type-punning
C++
C
Unions
Type Punning
What does "collect2: error: ld returned 1 exit status" mean?
C
Compiler Errors
How to build x86 and/or x64 on Windows from command line with CMAKE?
C
Visual Studio
Cmake
Cross Compiling
X86 64
What is the time complexity of my function?
C
Algorithm
Time Complexity
Fastest way to zero out a 2d array in C?
C
Arrays
Multidimensional Array
Zero
Memset
How to use glOrtho() in OpenGL?
C++
C
Opengl
How do I return multiple values from a function in C?
C
Return Value
How can I multiply and divide using only bit shifting and adding?
C
Assembly
Bit Manipulation
Division
Multiplication
How to make backtrace()/backtrace_symbols() print the function names?
C
Linux
Debugging
Backtrace
Correct way of declaring pointer variables in C/C++
C++
C
Pointers
Coding Style
Why can't C compilers rearrange struct members to eliminate alignment padding?
C
Struct
Compiler Optimization
Memory Alignment
What is a “memory stomp”?
C++
C
Memory
Memory Management
C Programming: How to read the whole file contents into a buffer
C
File Io
0.1 float is greater than 0.1 double. I expected it to be false
C++
C
Floating Point
Double
Rounding
How can I run a C program on Mac OS X using Terminal?
C
Macos
Bash
Results of printf() and system() are in the wrong order when output is redirected to a file
C
Linux
Printf
Child Process
Io Redirection
Can't compile a C program on a Mac after upgrading to Catalina 10.15
C
Xcode
Macos
Gcc
Macos Catalina
How to calculate the CPU usage of a process by PID in Linux from C?
C
Linux
Cpu Usage
What is the point of function pointers?
C++
C
Function
Pointers
C++ Faq
Print text instead of value from C enum
C
Enums
Difference between const & const volatile
C
Embedded
What are the different versions of exec used for in C and C++?
C++
C
Exec
C: printf a float value
C
Floating Point
Convert hex string (char []) to int?
C
Char
Int
C Memory Management
C
Memory
Http status code with libcurl?
C
Http
Libcurl
How to programmatically cause a core dump in C/C++
C++
C
Linux
Coredump
Abort
How to format a number from 1123456789 to 1,123,456,789 in C?
C
Formatting
Numbers
How to use nan and inf in C?
C
Math
Nan
Infinity
Platform independent size_t Format specifiers in c?
C
Platform Independent
Size T
Format String
Format Specifiers
How to modify memory contents using GDB?
C
Linux
Memory
Gdb
How does the Import Library work? Details?
C++
C
Windows
Visual C++
What exactly is the "as-if" rule?
C++
C
Optimization
C++ Faq
As If
Understanding container_of macro in the Linux kernel
C
Linux Kernel
C Preprocessor
How can one print a size_t variable portably using the printf family?
C
Printf
Difference between surface and texture (SDL / general)
C
Graphics
Sdl
Sdl 2
Why does C not allow concatenating strings when using the conditional operator?
C
String
Syntax
Concatenation
Conditional Operator
Why is assigning a value to a bit field not giving the same value back?
C++
C
Bit Fields
Signed Integer
Implementation Defined-Behavior
Testing pointers for validity (C/C++)
C++
C
Validation
Pointers
Null
C# vs C - Big performance difference
C#
C
Performance
Why should you use strncpy instead of strcpy?
C
Buffer Overflow
Strcpy
C89
Strncpy
How to call C++ function from C?
C++
C
Visual C++
Extern C
Struct memory layout in C
C
Struct
Memory Layout
How to get the current time in milliseconds from C in Linux?
C
Linux
Posix
Are GCC and Clang parsers really handwritten?
C
Parsing
Compiler Construction
Compilation
Efficiency of premature return in a function
C#
Java
C++
C
Compiler Optimization
Multi line preprocessor macros
C++
C
C Preprocessor
Initializing entire 2D array with one value
C
Arrays
Initialization
Why does the terminal show "^[[A" "^[[B" "^[[C" "^[[D" when pressing the arrow keys in Ubuntu?
C
Ubuntu
The differences between initialize, define, declare a variable
C++
C
Terminology
What's the purpose of this [1] at the end of struct declaration?
C
Struct
Reverse Engineering
Declaration
Typedef
How does free know how much to free?
C
Size
Pointers
Free
What is Linux’s native GUI API?
C++
C
Linux
User Interface
How do you get assembler output from C/C++ source in gcc?
C++
C
Assembly
Gcc
Disassembly
When to use static keyword before global variables?
C
Static
Keyword
Design Principles, Best Practices and Design Patterns for C (or Procedural Programming in general)?
C
Design Patterns
Principles
Are there any "design patterns" in C?
C
Design Patterns
What does OpenCV's cvWaitKey( ) function do?
C++
C
Opencv
#ifdef inside #define
C
C Preprocessor
Is it good practice to free a NULL pointer in C?
C
Pointers
Memory Management
How do I check if a variable is of a certain type (compare two types) in C?
C
Types
Struct
What can cause a “Resource temporarily unavailable” on sock send() command
C
Linux
Sockets
Unix
How does the main() method work in C?
C++
C
Why is memmove faster than memcpy?
C++
C
Performance
Memory
Open source PDF library for C/C++ application?
C++
C
Pdf
Open Source
Easy way to use variables of enum types as string in C?
C
Enums
C Preprocessor
Threadsafe vs re-entrant
C
Thread Safety
Reentrancy
How to convert char to integer in C?
C
Char
Int
UNIX nonblocking I/O: O_NONBLOCK vs. FIONBIO
C
Network Programming
Unix
Sockets
Does stack grow upward or downward?
C
Memory
Stack
When should I use malloc in C and when don't I?
C
Memory
Memory Management
Which functions from the standard library must (should) be avoided?
C
Standard Library
Obsolete
How do I compile a .c file on my Mac?
C
Macos
Detecting signed overflow in C/C++
C++
C
Undefined Behavior
Signed
Integer Overflow
Difference between <string.h> and <strings.h>
C
String
Header
Is gcc C compiler written in C itself?
C
Gcc
Compiler Construction
(Why) is using an uninitialized variable undefined behavior?
C
Undefined Behavior
Initialization
What is the difference between static const and const?
C
Static
Constants
Is there a standard sign function (signum, sgn) in C/C++?
C++
C
Math
Trying to understand gcc option -fomit-frame-pointer
C
Performance
Gcc
Cpu Registers
Stack Frame
How to copy a char array in C?
C
Arrays
Char
Copy
Where can one find the C89/C90 standards in PDF format?
C
Ansi
C89
Is multiplication faster than float division?
C++
C
Performance
Optimization
Why only define a macro if it's not already defined?
C
Macros
C Preprocessor
Ifndef
Does the C standard explicitly indicate truth value as 0 or 1?
C
Why isn't all code compiled position independent?
C
Compilation
Rounding integer division (instead of truncating)
C
Math
Int
Rounding
Integer Division
C99 boolean data type?
C
Types
Boolean
C99
Searching in a sorted and rotated array
C++
C
Arrays
Algorithm
C error: undefined reference to function, but it IS defined
C
Function
Linker Errors
Undefined Reference
Parsing JSON using C
C
Json
What's wrong with this 1988 C code?
C
How to display a progress indicator in pure C/C++ (cout/printf)?
C++
C
User Interface
C++11
Io
Finding out what the GCC include path is
C
Linux
Gcc
C Preprocessor
Printing null pointers with %p is undefined behavior?
C
Language Lawyer
C99
Undefined Behavior
C11
Static linking vs dynamic linking
C++
C
Performance
Static Linking
Dynamic Linking
How many levels of pointers can we have?
C++
C
Pointers
Language Lawyer
Limit
How do I create a "spacer" in a C++ class memory structure?
C++
C
Memory Management
Low Level
Bare Metal
Variable declarations in header files - static or not?
C++
C
Static
Detecting CPU architecture compile-time
C++
C
Detection
Cpu Architecture
Compile Time
String Padding in C
C
String
Padding
I've heard i++ isn't thread safe, is ++i thread-safe?
C++
C
Multithreading
Default values in a C Struct
C
Initialization
C/C++: Force Bit Field Order and Alignment
C++
C
Bit Manipulation
Endianness
Bit
Algorithm: efficient way to remove duplicate integers from an array
C
Algorithm
Arrays
Duplicates
Uses of C comma operator
C++
C
Comma Operator
Using fflush(stdin)
C
Stdin
Fflush
error : storage class specified for parameter
C
Linux
Is snprintf() ALWAYS null terminating?
C
Posix
Libc
Why are memcpy() and memmove() faster than pointer increments?
C++
C
Loops
What's the result of += in C and C++?
C++
C
ISO C90 forbids mixed declarations and code in C
C
Variables
How to avoid using printf in a signal handler?
C
Linux
Signals
Visual Studio Code, #include <stdio.h> saying "Add include path to settings"
C++
C
Visual Studio-Code
Is it possible to initialize a C pointer to NULL?
C
Pointers
Initialization
Is C strongly typed?
C
Strong Typing
Weakly Typed
C non-blocking keyboard input
C
Linux
Asynchronous
Input
Nonblocking
Is it possible to modify a string of char in C?
C
String
Debugging
How to prevent scanf causing a buffer overflow in C?
C
Scanf
Buffer Overflow
How to get a FILE pointer from a file descriptor?
C
Posix
Mkstemp
What causes the Broken Pipe Error?
C
Broken Pipe
Convert an int to ASCII character
C++
C
Ascii
What are the barriers to understanding pointers and what can be done to overcome them?
C++
C
Pointers
Why is the use of alloca() not considered good practice?
C
Stack
Malloc
Allocation
Alloca
System where 1 byte != 8 bit?
C++
C
Byte
History
Computer Architecture
How to disable compiler optimizations in gcc?
C
Gcc
Compiler Optimization
Compiler Options
How to deal with symbol collisions between statically linked libraries?
C
Static
Libraries
Collision
Symbols
"Life-time" of a string literal in C
C
Function
Local Variables
String Literals
Lifetime
dup2 / dup - why would I need to duplicate a file descriptor?
C
Linux
Operating System
System Calls
How to repeat a char using printf?
C
Printf
Xcode - Warning: Implicit declaration of function is invalid in C99
C
Xcode
What is a symbol table?
C++
C
Symbol Table
What does the unary plus operator do?
C#
C++
C
Unary Operator
How to pass variable number of arguments to printf/sprintf
C++
C
Printf
Variadic Functions
Specifically, what's dangerous about casting the result of malloc?
C
How to define a string literal in gcc command line?
C++
C
Gcc
Command Line
Macros
Super high performance C/C++ hash map (table, dictionary)
C++
C
Dictionary
Hashtable
Hashmap
Why do C and C++ support memberwise assignment of arrays within structs, but not generally?
C++
C
Arrays
Variable Assignment
Struct
How to allocate aligned memory only using the standard library?
C
Memory Management
What is array to pointer decay?
C++
C
Arrays
Pointers
What do square brackets mean in array initialization in C?
C
Arrays
What's the use of memset() return value?
C++
C
Memset
C - The %x format specifier
C
String
Security
Format
Using roxygen2 and doxygen on the same package?
C
R
Documentation
Doxygen
Roxygen2
How do I convert a C string into a Rust string and back via FFI?
C
Ffi
Rust
Why is this struct size 3 instead of 2?
C++
C
Struct
Endless sine generation in C
C
Performance
Time
Precision
Trigonometry
What are the applications of the ## preprocessor operator and gotchas to consider?
C
C Preprocessor
Kernighan and-Ritchie
Stringification
How can the Linux kernel compile itself?
C
Linux
Compiler Construction
C programming: How to program for Unicode?
C
Unicode
Utf 8
Character Encoding
Locale
Is there any reason to use C instead of C++ for embedded development?
C++
C
Embedded
C89
memset() or value initialization to zero out a struct?
C++
C
Visual C++
Struct
Initialization
Any simple way to log in Android NDK code?
Android
C
Logging
Android Ndk
Java Native-Interface
Why doesn't a+++++b work?
C
Lvalue
Case Insensitive String Comparison in C
C
String
String Comparison
Standard Library
Ignore Case
What is an opaque pointer in C?
C
Pointers
Opaque Pointers
What is this (( ))?
C++
C
What makes Java easier to parse than C?
Java
C
Parsing
Grammar
warning: Error disabling address space randomization: Operation not permitted
C
Docker
Gdb
Is the definition of "volatile" this volatile, or is GCC having some standard compliancy problems?
C++
C
Gcc
Standards
Why do you program in assembly?
C
Performance
Low Level
Assembly
Why does strncpy not null terminate?
C
Strncpy
How can I get my C code to automatically print out its Git version hash?
C
Git
Version Control
Workflow
Variably modified array at file scope
C
Objective C
Arrays
Static
Constants
Developing C wrapper API for Object-Oriented C++ code
C++
C
Wrapper
What does "request for member '*******' in something not a structure or union" mean?
C
Struct
Unions
printf anomaly after "fork()"
C
Linux
Unix
Printf
Fork
Why is CUDA pinned memory so fast?
C++
C
Linux
Cuda
trap representation
C++
C
Visual Studio-2010
Gcc
Language Lawyer
Where is the <conio.h> header file on Linux? Why can't I find <conio.h>?
C
Linux
Gcc
Header Files
Math constant PI value in C
C
Why is the size of a function in C always 1 byte?
C
Function
Size
Sizeof
What Does This Valgrind Warning Mean? - warning set address range perms
C
Memory
Valgrind
Do compilers produce better code for do-while loops versus other types of loops?
C
Performance
Compiler Construction
Why does `free` in C not take the number of bytes to be freed?
C
Memory Management
Malloc
Free
Efficient way to search an element
C
Arrays
Algorithm
Sorting
Search
Difference between uint8_t, uint_fast8_t and uint_least8_t
C++
C
Integer
Avr
C99
Why does printf("%f",0); give undefined behavior?
C++
C
Printf
Implicit Conversion
Undefined Behavior
Difference between a Structure and a Union
C
Struct
Unions
What is the difference between using a Makefile and CMake to compile the code?
C++
C
Makefile
Cmake
Function pointers, Closures, and Lambda
C
Lisp
Lambda
Computer Science
Closures
Is TCHAR still relevant?
C++
C
Windows
Unicode
Wchar T
Are stack variables aligned by the GCC __attribute__((aligned(x)))?
C
Gcc
Memory Alignment
Callstack
Selectively disable GCC warnings for only part of a translation unit
C++
C
Gcc
Compiler Warnings
Pragma
Getting "conflicting types for function" in C, why?
C
Arrays
Using true and false in C
C
Coding Style
How to convert integer to char in C?
C
How does this program work?
C++
C
Memory
Printf
Endianness
What are the best (portable) cross-platform arbitrary-precision math libraries?
C++
C
Biginteger
Bigdecimal
Gmp
How, exactly, does the double-stringize trick work?
C
C Preprocessor
Stringification
strcpy vs. memcpy
C
Memcpy
Strcpy
Converting an int into a 4 byte char array (C)
C
How to code a modulo (%) operator in C/C++/Obj-C that handles negative numbers
C++
C
C++11
Operator Overloading
Modulo
Why the strange indentation on switch statements?
Java
C
Syntax
Why (and when) do I need to use parentheses after sizeof?
C
Sizeof
What does the FD_CLOEXEC fcntl() flag do?
C
srand() — why call it only once?
C
Random
Srand
What is use of c_str function?
C++
C
String
C Str
difference between stdint.h and inttypes.h
C
Uint64
Stdint
The difference between asm, asm volatile and clobbering memory
C
Gcc
Inline Assembly
What does "Objective-C is a superset of C more strictly than C++" mean exactly?
C++
Objective C
C
Correctly allocating multi-dimensional arrays
C
Arrays
Dynamic Arrays
Dynamic Allocation
Variable Length-Array
Auto-indent spaces with C in vim?
C
Vim
Coding Style
Vi
How can one grab a stack trace in C?
C
Windows
Debugging
Cross Platform
Stack Trace
What is ":-!!" in C code?
C
Linux
Macros
Linux Kernel
Is Fortran easier to optimize than C for heavy calculations?
C
Performance
Fortran
Why do all the C files written by my lecturer start with a single # on the first line?
C
C Preprocessor
Is it a good idea to typedef pointers?
C++
C
Pointers
Typedef
Conventions
Why GDB jumps unpredictably between lines and prints variables as "<value optimized out>"?
C
Optimization
Compiler Construction
Gdb
Compilation
C function syntax, parameter types declared after parameter list
C
Syntax
Function
How can I completely disable calls to assert()?
C++
C
Assert
How do I get DOUBLE_MAX?
C
Double
How does photoshop blend two images together?
C++
C
Math
Image Processing
Photoshop
What is the purpose of the unary plus (+) operator in C?
C
Expression
Evaluation
Unary Operator
script/tool to convert file to C/C++ source code array
C
Binary
Where does linux store my syslog?
C
Linux
Logging
Can multithreading be implemented on a single processor system?
C
Windows
Multithreading
Winapi
Why would uint32_t be preferred rather than uint_fast32_t?
C++
C
Int
Why do C and C++ allow the expression (int) + 4*5?
C++
C
Casting
Language Lawyer
memory bandwidth for many channels x86 systems
C
X86
Openmp
Avx512
Memory Bandwidth
How do I determine the number of digits of an integer in C?
C
Math
How to avoid pressing Enter with getchar() for reading a single character only?
C
Input
Character
Getchar
Unbuffered
Printing all environment variables in C / C++
C++
C
Static vs global
C
Static
Global
How to append strings using sprintf?
C
Printf
shared global variables in C
C
Variables
Linker
Global Variables
Scope
Why are Python Programs often slower than the Equivalent Program Written in C or C++?
C++
Python
C
Performance
Programming Languages
What is a portable method to find the maximum value of size_t?
C
Size T
Replacing ld with gold - any experience?
C++
C
Linker
Migration
Gold Linker
Where does the word "pragma" come from?
C++
C
Terminology
Pragma
Are parentheses around the result significant in a return statement?
C++
C
Semantics
Two decimal places using printf( )
C++
C
Printf
Decimal
How to concatenate string and int in C?
C
String
Where you can and cannot declare new variables in C?
C
Declaration
When and why to use malloc?
C
Malloc
Dynamic Memory-Allocation
Is it safe to return a struct in C or C++?
C++
C
Function
Struct
Return Type
What is the role of libc(glibc) in our linux app?
C
Linux
Gnu
At what point in the loop does integer overflow become undefined behavior?
C++
C
Undefined Behavior
Integer Overflow
Recommended gcc warning options for C
C
Gcc
Compiler Errors
How to list physical disks?
C
Windows
Winapi
Hard Drive
Assigning strings to arrays of characters
C
Is there ever a need for a "do {...} while ( )" loop?
C++
C
Loops
Why are strlcpy and strlcat considered insecure?
C
Security
Strncpy
Strlcpy
What is the difference between a static and const variable?
C++
C
Static
Constants
Remove comments from C/C++ code
C++
C
Comments
How do I print the full value of a long string in gdb?
C++
C
String
Debugging
Gdb
Calling a python method from C/C++, and extracting its return value
C++
Python
C
Python C-Api
Python Embedding
Which is faster: x<<1 or x<<10?
C++
C
Performance
Cpu
Low Level
performance of unsigned vs signed integers
C++
C
Integer
Int
Unsigned
Why does GCC pad functions with NOPs?
C
Assembly
Gcc
Memory Alignment
Definition of int64_t
C++
C
Integer
Long Integer
How to get Selected Text from select2 when using <input>
C
Javascript
Jquery
Knockout 2.0
Jquery Select2
Saturating subtract/add for unsigned bytes
C++
C
Optimization
Bit Manipulation
Saturation Arithmetic
Big difference (x9) in the execution time between almost identical code in C and C++
C++
C
Performance
Gcc
Iostream
Double cast to unsigned int on Win32 is truncating to 2,147,483,648
C
Visual C++
Casting
X86
Floating Point
Best timing method in C?
C
Performance
Timer
Timing
Checking if a pointer is allocated memory or not
C
Pointers
How to get MAC address of your machine using a C program?
C
Linux
Mac Address
Is it possible to iterate over arguments in variadic macros?
C
Foreach
C99
C Preprocessor
Variadic
How to use /dev/random or urandom in C?
C
Linux
Random
POSIX threads and signals
C
Pthreads
Signals
Is it possible to determine the thread holding a mutex?
C
Linux
Multithreading
Pthreads
Mutex
How to pass 2D array (matrix) in a function in C?
C
Multidimensional Array
Parameter Passing
Why use pointers?
C++
C
Pointers
How can I get a file's size in C?
C
File
Size
How do you format an unsigned long long int using printf?
C
Syntax
Printf
Format Specifiers
Long Long
Generate a random float between 0 and 1
Ios
C
Random
Floating Point
Arc4random
Is it guaranteed to be safe to perform memcpy(0,0,0)?
C
Memcpy
Language Lawyer
Null Pointer
Checking if float is an integer
C
Floating Point
Int
What is a file with extension .a?
C
Gcc
Shared Libraries
Why does modulus division (%) only work with integers?
C++
C
Why does malloc initialize the values to 0 in gcc?
C
Linux
Gcc
Malloc
Message "unknown type name 'uint8_t'" in MinGW
C
Windows
Mingw
Where to find the complete definition of off_t type?
C
Sockets
Networking
Types
Header Files
Difference between C standard library and C POSIX library
C
Posix
Standard Library
Why is a point-to-volatile pointer, like "volatile int * p", useful?
C
Pointers
Volatile
This obfuscated C code claims to run without a main(), but what does it really do?
C
C Preprocessor
Obfuscation
Is it safe to rename argc and argv in main function?
C++
C
Main
Can argc be zero on a POSIX system?
C
Posix
Language Lawyer
Main
Why cast free's return value to void?
C
Casting
Free
Void
Legacy Code
Do you use the TR 24731 'safe' functions?
C
Security
Coding Style
Tr24731
Socket accept - "Too many open files"
C
Sockets
How to Declare a 32-bit Integer in C
C
Portability
Use of min and max functions in C++
C++
C
Max
Min
How should I get started on writing device drivers?
C
Assembly
Hardware
Drivers
What are intrinsics?
C++
C
Intrinsics
Get home directory in Linux
C++
C
Linux
Finding the length of an integer in C
C
Integer
Digit
Moving from C++ to C
C++
C
Is Google Test OK for testing C code?
C
Googletest
Difference between .a .o and .lo file
C++
C
Shared Libraries
Libraries
Real-world use of X-Macros
C
Macros
C Preprocessor
X Macros
Using MPI_Bcast for MPI communication
C
Mpi
Broadcast
C code loop performance [continued]
C
Performance
Intel
Instructions
Assembly
What should be the sizeof(int) on a 64-bit machine?
C++
C
Sizeof
undefined reference to `std::ios_base::Init::Init()'
C
Matrix
Coredump
Benefits of pure function
C
Pure Virtual
Difference between uint32 and uint32_t
C++
C
Uint32
Uint32 T
Fastest way to get a positive modulo in C/C++
C++
C
Performance
Portable way to check if directory exists [Windows/Linux, C]
C
File
Directory
File Exists
Can code that will never be executed invoke undefined behavior?
C
Language Lawyer
Difference between r+ and w+ in fopen()
C
Fopen
Is it ever OK to *not* use free() on allocated memory?
C++
C
Memory Management
Memory Leaks
Heap Memory
Visually what happens to fork() in a For Loop
C
Fork
What is special about structs?
C
Arrays
Struct
Return
Return Value
Is using an unsigned rather than signed int more likely to cause bugs? Why?
C++
C
Google Style-Guide
Is there an elegant and fast way to test for the 1-bits in an integer to be in a contiguous region?
C++
C
Bit Manipulation
Tool to visualise code flow (C/C++)
C++
C
Code Analysis
How do I share variables between different .c files?
C
How to get the date and time values in a C program?
C
Datetime
Erase the current printed console line
C
Linux
Console
Erase
Why is the compiler throwing this warning: "missing initializer"? Isn't the structure initialized?
C
Winapi
Gcc
What is the size of void?
C++
C
Language Lawyer
Sizeof
Volatile Struct Semantics
C
Struct
Volatile
Finding the length of a Character Array in C
Arrays
C
Strlen
Is It Possible to NSLog C Structs (Like CGRect or CGPoint)?
C
Objective C
Cocoa
Cocoa Touch
What does (void) 'variable name' do at the beginning of a C function?
C
Fuse
How to use nanosleep() in C? What are `tim.tv_sec` and `tim.tv_nsec`?
C
Posix
Sleep
How to Add Linux Executable Files to .gitignore?
C++
C
Linux
Git
Gitignore
How to obtain JNI interface pointer (JNIEnv *) for asynchronous calls
Java
C
Multithreading
Java Native-Interface
Difference between dangling pointer and memory leak
C
Conflict between a Stanford tutorial and GCC
C
Gcc
Memory Management
Is accessing data in the heap faster than from the stack?
C++
C
Performance
Heap Memory
Stack Memory
Does the order of members in a struct matter?
C
Struct
Switch-case won't compile after commenting out an unused line
C
Should we use exit() in C?
C
Why does the statement "2i;" NOT cause a compiler error?
C
Syntax
"int *nums = {5, 2, 1, 4}" causes a segmentation fault
C
Arrays
Pointers
Android AudioRecord forcing another stream to MIC audio source
Java
Android
C
Android Ndk
Qualcomm
Why isn't #pragma once automatically assumed?
C++
C
Pragma
Parenthesis surrounding return values in C
C
Syntax
Coding Style
How should I structure complex projects in C?
C
Project Management
How to Compile for OS X in Linux or Windows?
C++
C
Macos
Cross Compiling
How do you implement a circular buffer in C?
C
Data Structures
Circular Buffer
min and max value of data type in C
C
Types
pthreads mutex vs semaphore
C
Linux
Synchronization
Pthreads
Mutex
Does the size of an int depend on the compiler and/or processor?
C++
C
Types
How to turn off gcc compiler optimization to enable buffer overflow
C
Gcc
Buffer Overflow
Compiler Optimization
What is the use of .exp and what is the difference between .lib and .dll?
C
Dll
Linker
Static Libraries
Is there something like the official C documentation?
C
Documentation
What is the max. value of a double/float on iOS?
Ios
C
Objective C
Double
Is C open source?
C
Compiler Construction
Open Source
Undefined reference to sqrt (or other mathematical functions)
C
Linker Errors
Undefined Reference
How dangerous is it to compare floating point values?
Objective C
Ios
C
Floating Point
Floating Accuracy
How do I compile the asm generated by GCC?
C
Gcc
Compiler Construction
Assembly
ULL suffix on a numeric literal
C++
C
Copy struct to struct in C
C
Struct
Copy
Microchip
How to get 100% CPU usage from a C program
C
Windows
Linux
Performance
Cray
Why would code actively try to prevent tail-call optimization?
C++
C
Optimization
Compiler Optimization
Tail Call-Optimization
Simulation of templates in C (for a queue data type)
C
Templates
Is it possible to call a C function from C#.Net
C
C# 4.0
Interop
strcpy vs strdup
C
Strcpy
Strdup
Bind failed: Address already in use
C
Linux
Sockets
Addresses of two char pointers to different string literals are same
C
Pointers
Literals
Is there a reason why not to use link-time optimization (LTO)?
C++
C
Performance
Compilation
Compiler Optimization
How to convert const char* to char* in C?
C
Pointers
Const Char
Enum constants behaving differently in C and C++
C++
C
Incrementing 'masked' bitsets
C++
C
Bit Manipulation
Intrinsics
What's the difference between a header file and a library?
C++
C
Take the address of a one-past-the-end array element via subscript: legal by the C++ Standard or not?
C++
C
Standards
Language Lawyer
Bitwise operators and "endianness"
C
Bit Manipulation
Endianness
Bit Shift
Print the address or pointer for value in C
C
Pointers
Memory Address
Alternative (K&R) C syntax for function declaration versus prototypes
C
Function
Function Declaration
Kernighan and-Ritchie
Function Definition
How do I show what fields a struct has in GDB?
C
Gdb
Catch and compute overflow during multiplication of two large integers
C
Integer
Bit Manipulation
Multiplication
Integer Overflow
What does EAGAIN mean?
C
Sockets
Unix
Posix
Explain this snippet which finds the maximum of two integers without using if-else or any other comparison operator?
C
Algorithm
Math
Bit Manipulation
Max
Which is better option to use for dividing an integer number by 2?
C++
C
Optimization
Division
Micro Optimization
How to printf "unsigned long" in C?
C
Printf
Long Integer
Unsigned
Format Specifiers
Is it possible to print out only a certain section of a C-string, without making a separate substring?
C
Printf
C Strings
Matrix multiplication: Small difference in matrix size, large difference in timings
C
Performance
Algorithm
Matrix Multiplication
Python: why are * and ** faster than / and sqrt()?
Python
C
Performance
Python 2.7
Python Internals
C program to check little vs. big endian
C
Byte
Endianness
why does %d stand for Integer?
C
Formatting
Printf
What are the rules for casting pointers in C?
C
Pointers
Casting
Why is this version of logical AND in C not showing short-circuit behavior?
C
Short Circuiting
Make C floating point literals float (rather than double)
C
Gcc
Floating Point
Literals
How to resolve the "EVP_DecryptFInal_ex: bad decrypt" during file decryption
C
Encryption
Openssl
Is this how the + operator is implemented in C?
C
Operators
Bitwise Operators
C addition using modulus
C
Addition
Mod
How can I run an external program from C and parse its output?
C
External Process
Examples of good gotos in C or C++
C++
C
Goto
Is using flexible array members in C bad practice?
C
Arrays
Data Structures
Flexible Array-Member
Container Class / Library for C
C
Containers
How can I simulate OO-style polymorphism in C?
C
Oop
Polymorphism
state machines tutorials
C
C99
State Machine
Unable to free const pointers in C
C
Constants
Free
For vs. while in C programming?
C
Loops
For Loop
While Loop
How exactly does __attribute__((constructor)) work?
C++
Objective C
C
Gcc
Fastest way to determine if an integer is between two integers (inclusive) with known sets of values
C++
C
Performance
Math
Why FolderBrowserDialog dialog does not scroll to selected folder?
C#
C
Folderbrowserdialog
Why are NULL pointers defined differently in C and C++?
C++
C
Pointers
Null
Is the behavior of subtracting two NULL pointers defined?
C++
C
C99
C89
How does fread really work?
C
Fread
C and C++ : Partial initialization of automatic structure
C++
C
C++ - include unistd.h: why not cunistd?
C++
C
Declaring and checking/comparing (bitmask-)enums in Objective-C
Objective C
C
Cocoa
Enums
Bitmask
How can I read an input string of unknown length?
C
Scanf
1D or 2D array, what's faster?
C++
C
Arrays
Read and write to binary files in C?
C
Linux
File Io
Binary
Exceptions to array decaying into a pointer?
C
Arrays
Pointers
How to make parent wait for all child processes to finish?
C
Process
Operating System
Fork
Posix
If a 32-bit integer overflows, can we use a 40-bit structure instead of a 64-bit long one?
C++
C
Memory Management
Integer Overflow
Compile and run program without main() in C
C
Gcc
Segmentation Fault
Main
Gcc Warning
Why is the ternary operator used to define 1 and 0 in a macro?
C++
C
Boolean
Ternary Operator
Can I use NULL as substitution for the value of 0?
C++
C
Pointers
Null
Language Lawyer
Subtracting packed 8-bit integers in an 64-bit integer by 1 in parallel, SWAR without hardware SIMD
C++
C
Bit Manipulation
Simd
Swar
Understanding the behavior of C's preprocessor when a macro indirectly expands itself
C
Macros
C Preprocessor
Is there a way to insert assembly code into C?
C
Inline Assembly
Assembly
Getting a FILE* from a std::fstream
C++
C
File
File Io
Fstream
Best C/C++ Network Library
C++
C
Networking
Is NULL always false?
C
Null
Pointers
Why would you use 'extern "C++"'?
C++
C
What are C macros useful for?
C
Macros
C Preprocessor
Language Design
Language Features
Array size at run time without dynamic allocation is allowed?
C++
C
Array Initialization
How do you introduce unit testing into a large, legacy (C/C++) codebase?
C++
C
Unit Testing
Unix
Legacy
What does the registerNatives() method do?
Java
C
Object
Methods
Java Native-Interface
Struct Inheritance in C
C
Structure
How do you declare string constants in C?
C
String
What are the most useful new features in C99?
C
C99
Disadvantages of scanf
C
Input
User Input
Scanf
error LNK2005: xxx already defined in MSVCRT.lib(MSVCR100.dll) C:\something\LIBCMT.lib(setlocal.obj)
C++
C
Visual C++
Linker
msvcr100.dll
C Programming: malloc() inside another function
C
Function
Pointers
Malloc
How do I concatenate const/literal strings in C?
C
String
Concatenation
What is the LD_PRELOAD trick?
C
Linux
Environment Variables
increment value of int being pointed to by pointer
C
Pointers
Increment
Post Increment
What's the use of suffix `f` on float value
C
Floating Point
How to add multiple header include and library directories to the search path in a single gcc command?
C
Gcc
Does const-correctness give the compiler more room for optimization?
C++
C
Pointers
Constants
Const Correctness
What is the equivalent to getch() & getche() in Linux?
C
Linux
Getchar
Getch
Getc
What happens if I don't call fclose() in a C program?
C
File Io
Fopen
Fclose
How to project a point onto a plane in 3D?
C++
C
"strlen(s1) - strlen(s2)" is never less than zero
C
String
Debugging
Unsigned
Why does the order of '-l' option in gcc matter?
C
Gcc
Linker
Ld
Why is the != operator not allowed with OpenMP?
C++
C
Multithreading
Parallel Processing
Openmp
Delete a file named "NUL" on Windows
C
Windows
Null
Cygwin
How can I print the result of sizeof() at compile time in C?
C
Sizeof
Compile Time
'readline/readline.h' file not found
C
Linux
Libreadline
When to use bit-fields in C?
C++
C
Memory
Struct
Types
Unusual usage of .h file in C
C++
C
Is declaration of variables expensive?
C
Why are there digraphs in C and C++?
C++
C
C99
Digraphs
C How to "draw" a Binary Tree to the console
C
Algorithm
Layout
Binary Tree
Is malloc thread-safe?
C
Multithreading
Thread Safety
Malloc
With arrays, why is it the case that a[5] == 5[a]?
C
Arrays
Pointers
Pointer Arithmetic
Is < faster than <=?
C++
C
Performance
Assembly
Relational Operators
What is the difference between const int*, const int * const, and int const *?
C++
C
Pointers
Constants
C++ Faq
The Definitive C Book Guide and List
C
Is it possible to tell the branch predictor how likely it is to follow the branch?
C
Gcc
X86
Compiler Optimization
Micro Optimization
What are the valid signatures for C's main() function?
C
Language Lawyer
Signature
Entry Point
Function Prototypes
Recursive mkdir() system call on Unix
C
Posix
Unix
Mkdir
How does dereferencing of a function pointer happen?
C++
C
Pointers
Function Pointers
Pthreads vs. OpenMP
C
Pthreads
Openmp
End of File (EOF) in C
C
Eof
How can I do GUI programming in C?
C
Windows
User Interface
Graphics
ffmpeg.c what are pts and dts ? what does this code block do in ffmpeg.c?
C
Ffmpeg
When is an integer<->pointer cast actually correct?
C++
C
Pointers
Casting
What's the Use of '\r' escape sequence?
C++
C
Escaping
Carriage Return
What's the C++ suffix for long double literals?
C++
C
Literals
Floating Point-Precision
Why must a short be converted to an int before arithmetic operations in C and C++?
C++
C
Int
Short
Integer Promotion
Does using heap memory (malloc/new) create a non-deterministic program?
C++
C
Real Time
Deterministic
Non Deterministic
What does impossibility to return arrays actually mean in C?
C
do { ... } while (0) — what is it good for?
C
Loops
Why does a function with no parameters (compared to the actual function definition) compile?
C
Parameters
Void
Function Prototypes
Function Parameter
Implementing RAII in pure C?
C
Raii
Variable declaration in a header file
C
Header
Determine size of dynamically allocated memory in C
C
Memory
Dynamic
Size
Allocation
How to write a signal handler to catch SIGSEGV?
C
Linux
System Calls
Signal Handling
Mprotect
What exactly is meant by "de-referencing a NULL pointer"?
C
Pointers
What are the implications of the linux __user macro?
C
Macros
Linux Kernel
Kernel
Makefile to compile multiple C programs?
C
Makefile
How do you check if a directory exists on Windows in C?
C
Windows
Winapi
How to prevent GCC from optimizing out a busy wait loop?
C
Optimization
Gcc
Avr Gcc
Variable declaration after goto Label
C
Goto
Variable Declaration
What is the function of an asterisk before a function name?
C
Function
Pointers
Syntax and Sample Usage of _Generic in C11
C
Generics
C11
Is char *envp[] as a third argument to main() portable
C
Environment Variables
Main
Portability
Function Signature
How can I check if a directory exists?
C
Linux
Directory
The difference between stdout and STDOUT_FILENO
C
Linux
Stdout
Meaning of "referencing" and "dereferencing" in C
C
Pointers
Reference
Dereference
How to view a pointer like an array in GDB?
C
Gdb
Endless loop in C/C++
C++
C
Loops
Infinite Loop
Is a^a or a-a undefined behaviour if a is not initialized?
C
Undefined Behavior
Why does this program print "forked!" 4 times?
C
Linux
Unix
Fork
Systems Programming
How to build a release version binary in Go?
C
Go
Build
Release
What is the purpose of ";" at the end of for loop?
C
For Loop
Printing all global variables/local variables?
C
Variables
Gdb
Global Variables
Why does the order of the loops affect performance when iterating over a 2D array?
C
Performance
For Loop
Optimization
Cpu Cache
Where do I find the current C or C++ standard documents?
C++
C
Standards
C++ Faq
Is masking before unsigned left shift in C/C++ too paranoid?
C++
C
Language Lawyer
Undefined Behavior
Integer Arithmetic
What is C17 and what changes have been made to the language?
C
Gcc
Iso
C11
C17
Convert a preprocessor token to a string
C
C Preprocessor
Stringification
How to copy directory from source tree to binary tree?
C
Copy
Cmake
How can I break out of two nested for loops in Objective-C?
C
Objective C
Loops
What is the Cost of an L1 Cache Miss?
C
Caching
Memory Access
C - determine if a number is prime
C#
C
Primes
Difference between "system" and "exec" in Linux?
C
Linux
Exec
Fork
Should I use #include in headers?
C
C Preprocessor
File Organization
Linux Kernel: System call hooking example
C
Linux Kernel
Hook
Performance of built-in types : char vs short vs int vs. float vs. double
C++
C
Performance
Built In
Maximum PID in Linux
C
Linux
Pid
Why does gcc allow arguments to be passed to a function defined to be with no arguments?
C
Gcc
Compiler Errors
DEBUG macros in C++
C++
C
Debugging
C Preprocessor
Printing leading 0's in C
C
Printf
Concept behind these four lines of tricky C code
C
Deobfuscation
fixed length data types in C/C++
C++
C
Loop with a zero execution time
C++
C
Optimization
Execution Time
As If
Do temp variables slow down my program?
C
Performance
Temporary
Can argc overflow?
C
Integer Overflow
Can I assume the size of long int is always 4 bytes?
C
Linux
Types
Posix
Why define \0 as the first element of a char array in C?
C
Arrays
Why not concatenate C source files before compilation?
C
Compilation
C Preprocessor
why does long long 2147483647 + 1 = -2147483648?
C++
C
Undefined Behavior
Integer Overflow
Twos Complement
Parameter evaluation order before a function calling in C
C
Parameters
Evaluation
Rerouting stdin and stdout from C
C
Redirect
Stdio
Override a function call in C
C
Function
Linker
Overriding
What's the correct way to use printf to print a size_t?
C++
C
Giving Command line arguments in Xcode in C program
C
Xcode
Command Line
How do I print a non-null-terminated string using printf?
C
String
Printf
what's the differences between r and rb in fopen
C
Windows
Linux
File
How to compile .c file with OpenSSL includes?
C
Linux
Compiler Construction
Openssl
Compiler Errors
Embedding resources in executable using GCC
C++
C
Gcc
Resources
Embedded Resource
Launch Failed. Binary not found. CDT on Eclipse Helios
C++
C
Eclipse
Eclipse Plugin
Eclipse Cdt
GDB: Listing all mapped memory regions for a crashed process
C
Linux
Gdb
Providing/passing argument to signal handler
C
Signals
Signal Handling
Difference between array type and array allocated with malloc
C
Arrays
Malloc
Variable Length-Array
PDF specifications for coders: Adobe or ISO?
C++
C
Pdf
Specifications
Mmh, who are you PRIu64?
C
Macros
Printf
Type conversion - unsigned to signed int/char
C
Types
Type Conversion
Integer Promotion
Signedness
Zombie process vs Orphan process
C
Unix
Fork
Zombie Process
Poor memcpy Performance on Linux
C++
C
Linux
Memcpy
Numa
What exactly does `-rdynamic` do and when exactly is it needed?
C
Gcc
Shared Libraries
Elf
Dynamic Loading
Pointers to pointers vs. normal pointers
C
Pointers
Why does "noreturn" function return?
C
Assembly
C11
Function Call
Noreturn
Why do you need to recompile C/C++ for each OS?
C++
C
Winapi
Compilation
Does C or C++ guarantee array < array + SIZE?
C++
C
Language Lawyer
Is there a one-line function that generates a triangle wave?
C
Passing an array by reference in C?
C
Arrays
Pass by-Reference
What do .c and .h file extensions mean to C?
C
File Type
Cs50
Why are global and static variables initialized to their default values?
C++
C
Static
Global Variables
Mixing extern and const
C++
C
Constants
Scope
Extern
Get IP address of an interface on Linux
C
Linux
Sockets
Compiling without libc
C
Gcc
Glibc
Demo
Libc
g++ linker: force static linking if static library exists?
C++
C
Linker
G++
Static Libraries
Why is there no strtoi in stdlib.h?
C
Libc
Why can a string be assigned to a char* pointer, but not to a char[] array?
C
String
Pointers
Initialization
Reusability
How do I make Makefile to recompile only changed files?
C
Makefile
Recompile
Flushing buffers in C
C
Buffer
Fflush
C - freeing structs
C
Struct
Malloc
Do I need to keep a file open after calling mmap on it?
C
Mmap
What are the common undefined/unspecified behavior for C that you run into?
C
Language Lawyer
Undefined Behavior
Unspecified Behavior
How to write a while loop with the C preprocessor?
C
While Loop
C Preprocessor
What are the benefits of a relative path such as "../include/header.h" for a header?
C
Include
Header
Passing an ellipsis to another variadic function
C
Variadic Functions
Is there an equivalent to WinAPI's MAX_PATH under linux/unix?
C++
C
Linux
Unix
Posix
Combine Gyroscope and Accelerometer Data
C
Algorithm
Accelerometer
Lego
Nxt
C and Python - different behaviour of the modulo (%) operation
Python
C
Math
Modulo
Effect of using a comma instead of a semi-colon in C and C++
C++
C
Hiding members in a C struct
C
Struct
Private Members
How to iterate over a string in C?
C
Iteration
Faster way to zero memory than with memset?
C
Libc
Fastest way to get the integer part of sqrt(n)?
C++
C
Algorithm
Math
Performance
How and when to align to cache line size?
C++
C
Caching
Can I use Intel syntax of x86 assembly with GCC?
C
Gcc
Assembly
X86
Inline Assembly
Which ordering of nested loops for iterating over a 2D array is more efficient
C
Performance
For Loop
Cpu Cache
Why are string literals l-value while all other literals are r-value?
C++
C
Literals
String Literals
Is function call an effective memory barrier for modern platforms?
C
Multithreading
Memory Barriers
Floating point exception ( SIGFPE ) on 'int main(){ return(0); }'
C
Linux
Gcc
Elf
Sigfpe
How do I get the intersection between two arrays as a new array?
Java
C++
C
Algorithm
Preprocessor check if multiple defines are not defined
C
C Preprocessor
Why would you use the keyword const if you already know variable should be constant?
C++
C
Constants
Keyword
How can a C compiler be written in C?
C
Compiler Construction
Kernighan and-Ritchie
What is the simplest standard conform way to produce a Segfault in C?
C
Segmentation Fault
Iso
Why would one use MACRO+0 !=0
C++
C
What is the fastest way to swap values in C?
C
Performance
What do 1.#INF00, -1.#IND00 and -1.#IND mean?
C++
C
Why is strncpy insecure?
C++
C
String
Strncpy
Looking for a good hash table implementation in C
C
String
Hashtable
Hash
how do aim bots in fps games work?
C++
C
Hook
Best way to check if a character array is empty
C
Arrays
Null
Char
How are exceptions implemented under the hood?
C++
Python
C
Exception
Rules for using the restrict keyword in C?
C
Optimization
Memory
Append to GNU make variables via command line
C
Makefile
Gnu Make
How do you read a segfault kernel log message
C++
C
Unix
Segmentation Fault
Syslog
Arguments to main in C
C
Command Line-Arguments
Main Method
How to get the number of CPUs in Linux using C?
C
Linux
Multithreading
Cpu
Processor
segfault only when NOT using debugger
C
Debugging
Gdb
Segmentation Fault
Copying one structure to another
C
Struct
Copy
How to generate CMakeLists.txt?
C++
C
Cmake
Mmap() an entire large file
C
Mmap
Detect Windows or Linux in C, C++
C++
C
Windows
Linux
Multi-Threading support in c11
C
Multithreading
C11
Returning from a void function
C
Function
Void
What are the differences between (and reasons to choose) tcmalloc/jemalloc and memory pools?
C
Linux
Memory
Malloc
Tcmalloc
How can I find the number of elements in an array?
C
Arrays
Sizeof
Why does C's printf format string have both %c and %s?
C
String Formatting
How can I find the header files of the C programming language in Linux?
C
Linux
Gcc
Header Files
Microsoft Crypto API Disable Use of RSAES-OAEP Key Transport Algorithm
C
Windows
Encryption
Cryptography
Mscapi
Whole one core dedicated to single process
C
Linux
Linux Kernel
Cpu
Scheduling
How to check if C string is empty
C
String
How to find the 'sizeof' (a pointer pointing to an array)?
C
Arrays
Pointers
Sizeof
MIN and MAX in C
C
Max
Min
C Preprocessor
Pointers in C: when to use the ampersand and the asterisk?
C
Pointers
Multiple definition of ... linker error
C
Linker
Linker Errors
Array-size macro that rejects pointers
C
Arrays
Macros
C Preprocessor
How do I use setsockopt(SO_REUSEADDR)?
C
Sockets
Raspberry Pi
The difference between C and C++ regarding the ++ operator
C++
C
Increment
Prefix
What kind of optimization does const offer in C/C++?
C++
C
Constants
Compiler Optimization
What does "[*]" (star modifier) mean in C?
C
Function
Parameters
Variable Length-Array
Is copying 2D arrays with "memcpy" technically undefined behaviour?
C++
C
Multidimensional Array
Language Lawyer
Undefined Behavior
Extending python - to swig, not to swig or Cython
Python
C++
C
Swig
Cython
Invoking GCC as "cc" versus "gcc"
C
Linux
Gcc
Compiler Construction
Gnu
Seeing expanded C macros
C
C Preprocessor
practical examples use dup or dup2
C
File
Unix
System Calls
Dup
How do you clear the console screen in C?
C
Windows
Console
Console Application
Order of execution for an if with multiple conditionals
C
How to detect if the current process is being run by GDB
C
Linux
Gdb
Posix
How to pass C structs back and forth to Java code in JNI?
Java
C
Java Native-Interface
Android Ndk
Determining endianness at compile time
C
Endianness
Left shifting with a negative shift count
C
how to make an application thread safe?
C++
C
Multithreading
Concurrency
Thread Safety
clock_gettime alternative in Mac OS X
C
Macos
Time
Clock
Why bit endianness is an issue in bitfields?
C
Cross Platform
Portability
Low Level
Bit Fields
Why are there no hashtables in the C standard library?
C
Dictionary
Hashtable
How to write iOS app purely in C
Objective C
Ios
C
Cocoa Touch
Objective C-Runtime
How to do an specific action when a certain breakpoint is hit in GDB?
C
Gdb
Where to find "gmp.h"?
C
Makefile
How can I get what my main function has returned?
C
Linux
Gcc
The real difference between "int" and "unsigned int"
C
Does Arduino use C or C++?
C++
C
Arduino
Can we have recursive macros?
C++
C
Macros
C Preprocessor
How does a NOP sled work?
C
Assembly
Stack
Buffer Overflow
Nop
Complex C declaration
C++
C
Function Pointers
Declaration
C++: Mysteriously huge speedup from keeping one operand in a register
C++
C
Performance
Optimization
Assembly
How to print an unsigned char in C?
C
Printf
How to write C/C++ code correctly when null pointer is not all bits zero
C++
C
Computer Architecture
Definitive List of Common Reasons for Segmentation Faults
C++
C
Segmentation Fault
Return void type in C and C++
C++
C
Gcc
Clang
Language Lawyer
Why is this code using strlen heavily 6.5x slower with GCC optimizations enabled?
C
Performance
Gcc
Glibc
Choosing a static code analysis tool
C
Unix
Testing
How can I get the size of an array from a pointer in C?
C
Memory Management
Pointers
Malloc
.o files vs .a files
C++
C
Linux
Gcc
Build Process
Compiling an application for use in highly radioactive environments
C++
C
Gcc
Embedded
Fault Tolerance
Combining C++ and C - how does #ifdef __cplusplus work?
C++
C
C Preprocessor
Extern C
How to compile C code with anonymous structs / unions?
C++
C
Struct
Anonymous
Unions
File Operations in Android NDK
C
File Io
Java Native-Interface
Android Ndk
Setting std=c99 flag in GCC
C
Programming Languages
C99
dereferencing pointer to incomplete type
C
Struct
Compiler Errors
Typedef
Dereference
Intrusive lists
C++
C
how to make a process daemon
C
Linux
Daemon
Systems Programming
How do I check if an integer is even or odd using bitwise operators
C
Bitwise Operators
Call c function from Java
Java
C
What is the reason for using a double pointer when adding a node in a linked list?
C
Pointers
Linked List
Aligning to cache line and knowing the cache line size
C
Linux
Caching
Computer Architecture
Memory Alignment
Difference between _Bool and bool types in C?
C
Types
Boolean
Valgrind not showing line numbers in spite of -g flag (on Ubuntu 11.10/VirtualBox)
C
Valgrind
htons() function in socket programing
C
Sockets
Unix Socket
Return value optimization and copy elision in C
C++
C
Struct
Return Value-Optimization
Copy Elision
Why wasn't a specifier for `float` defined in `printf`?
C
Floating Point
Printf
C Standard-Library
How to compile executable for Windows with GCC with Linux Subsystem?
C
Bash
Gcc
func() vs func(void) in C99
C
C99
Why is memcmp(a, b, 4) only sometimes optimized to a uint32 comparison?
C
Gcc
Clang
X86 64
Compiler Optimization
What is the difference between returning a char* and a char[] from a function?
C
String
Pointers
Daemon logging in Linux
C
Linux
Logging
Daemon
Is f(void) deprecated in modern C and C++?
C++
C
Refactoring
Void
Is there a way to find all the functions exposed by a dll
C++
C
Winapi
Dll
What's the best way to do a reverse 'for' loop with an unsigned index?
C
For Loop
How do I modify a pointer that has been passed into a function in C?
C
Function
Pointers
Parameters
Pass by-Value
Perceptron learning algorithm not converging to 0
C
Algorithm
Machine Learning
Neural Network
Perceptron
Does Qt have a C interface?
C
Qt
Using malloc for allocation of multi-dimensional arrays with different row lengths
C
Arrays
Malloc
How to return a value from pthread threads in C?
C
Pthreads
Difference between fflush and fsync
Fflush
Fsync
C
Windows
Where is `%p` useful with printf?
C++
C
Printf
readelf-like tool for Mac OS X?
C
Macos
Function
Symbols
What is the difference between sscanf or atoi to convert a string to an integer?
C
Scanf
Atoi
What's the difference between a null pointer and a void pointer?
C
Pointers
atol() v/s. strtol()
C
Strtol
How to set socket timeout in C when making multiple connections?
C
Linux
Sockets
warning: left shift count >= width of type
C
Bit Manipulation
Long Integer
Bit Shift
What is the purpose of the h and hh modifiers for printf?
C
Printf
Variadic Functions
Promotions
Format Specifiers
Code for printf function in C
C
Printf
Stdio
Converting from signed char to unsigned char and back again?
C++
C
Java Native-Interface
The difference of int8_t, int_least8_t and int_fast8_t?
C
What is the meaning of lines starting with a hash sign and number like '# 1 "a.c"' in the gcc preprocessor output?
C
Gcc
C Preprocessor
How to define relative paths in Visual Studio Project?
C
Visual Studio
Visual Studio-2008
Visual C++
C/C++ global vs static global
C++
C
Static
Global Variables
What if I don't write default in switch case?
C
Switch Statement
Length of array in function argument
C
Pointers
What is the purpose of epoll's edge triggered option?
C
Sockets
Epoll
Going through a text file line by line in C
C
Getline
Scanf
How to use gdb with LD_PRELOAD
C
Linux
Gcc
Gdb
X86 64
What is the difference between NULL, '\0' and 0?
C
Pointers
Null
What is the behavior of printing NULL with printf's %s specifier?
C
Linux
Language Lawyer
Compiler Bug
Difference between rdtscp, rdtsc : memory and cpuid / rdtsc?
C++
C
Performance
Assembly
Rdtsc
Printf long long int in C with GCC?
C
Gcc
Printf
C99
Can I turn unsigned char into char and vice versa?
C++
C
Is there a 128 bit integer in gcc?
C
Gcc
X86 64
Bigint
128 Bit
Why do I have to specify data type each time in C to printf() and scanf()?
C
Compiler Construction
Printf
Scanf
Returning function pointer type
C
Syntax
Types
Function Pointers
Linux shared memory: shmget() vs mmap()?
C
Linux
Posix
Shared Memory
Mmap
Delphi XE6 link C code in iOS
Ios
C
Delphi
Pascal
Delphi Xe6
Convert word2vec bin file to text
Python
C
Gensim
Word2vec
What is the use of the `inline` keyword in C?
C
Inline
C99
Is #define banned in industry standards?
C
C Preprocessor
Preprocessor Directive
If I want to round an unsigned integer to the closest smaller or equal even integer, can I divide by 2 then multiply by 2?
C++
C
Why is statically linking glibc discouraged?
C++
C
Linker
Glibc
Static Linking
How do you get a directory listing in C?
C
File
Directory
Cross Platform
Common Tasks
C/C++ source code visualization?
C++
C
Visualization
How Does sizeof(Array) work
C
Arrays
Post-increment on a dereferenced pointer?
C
Pointers
Operator Precedence
Trie implementation
C++
C
Data Structures
Trie
What makes a C standard library function dangerous, and what is the alternative?
C
Function
What Happens When Stack and Heap Collide
C++
C
Memory
Heap Memory
Stack Memory
How to capture Control+D signal?
C
Linux
Unix
Signals
Why enclose blocks of C code in curly braces?
C
Scope
Curly Braces
How do free and malloc work in C?
C
Memory
Free
Malloc
What is the type of string literals in C and C++?
C++
C
String
Constants
How to print a int64_t type in C
C
Stdint
Why is memory allocation on heap MUCH slower than on stack?
C
Memory Management
Stack
Is there any way a C/C++ program can crash before main()?
C++
C
Function
Crash
Arithmetic bit-shift on a signed integer
C
Bit Manipulation
Bit Shift
printf and long double
C
Gcc
Printf
Long Double
Error: Address already in use while binding socket with address but the port number is shown free by `netstat`
C
Linux
Sockets
redirect stdout/stderr to a string
C++
C
Stdout
Stderr
How do header and source files in C work?
C
Compilation
Header Files
know if .lib is static or import
C++
C
Windows
Dll
How can a Format-String vulnerability be exploited?
C
Security
Format String
When to use const char * and when to use const char []
C++
C
How can I check if char* variable points to empty string?
C
Pointers
Char
Global variables in header file
C
Free memory allocated in a different function?
C
Pointers
Memory Management
Malloc
Free
How do I get the unix timestamp in C as an int?
C
Unix
Timestamp
Epoch
How to compile makefile using MinGW?
C
Compiler Construction
Makefile
Mingw
typeof operator in C
C
Gcc
Typeof
How to share memory between processes created by fork()?
C
Fork
What is the default C -std standard version for the current GCC (especially on Ubuntu)?
C
Ubuntu
Gcc
C99
C11
Technically, how do variadic functions work? How does printf work?
C++
C
Variadic Functions
What does it mean for a program to be 32 or 64 bit?
C
32bit 64bit
C / C++ compiler warnings: do you clean up all your code to remove them or leave them in?
C++
C
Compiler Construction
Warnings
Why Switch/Case and not If/Else If?
C++
C
Switch Statement
Conditional Statements
How do I get a specific range of numbers from rand()?
C
Random
Convert RGB to Black & White in OpenCV
C++
C
Image Processing
Opencv
Computer Vision
How to detect LLVM and its version through #define directives?
C
Clang
Llvm
C Preprocessor
Does Function pointer make the program slow?
C
Pointers
Function Pointers
How does one encode a series of images into H264 using the x264 C API?
C
Image
h.264
X264
Is void a data type in C?
C
Types
Void
Very small programs to improve programming skills?
Java
C
How to get the Enum Index value in C#
C#
C
Enums
Integer
Why are LIB files beasts of such a duplicitous nature?
C
Dll
Shared Libraries
Static Libraries
Fast method to copy memory with translation - ARGB to BGR
C
X86
Rgb
Sse
Micro Optimization
Hide password input on terminal
C
Linux
Gcc
Terminal
Masking
Floating point comparison
C++
C
Floating Point
Set variable text column width in printf
C
Size
Printf
strdup or _strdup?
C++
C
Visual Studio
Strdup
True and False for && logic and || Logic table
C
Truthtable
Const correctness in C vs C++
C++
C
Constants
Dot (".") operator and arrow ("->") operator use in C vs. Objective-C
Objective C
C
Pointers
Dot Operator
Easily measure elapsed time
C++
C
Linux
Time
Measurement
How to split a string literal across multiple lines in C / Objective-C?
C
Objective C
String Literals
Is NULL always zero in C?
C
Pointers
Null
Zero
What happens to memory after '\0' in a C string?
C
String
Pointers
Malloc
C Strings
Why use asprintf() instead of sprintf()?
C
Printf
Gnu
Asprintf
How to get the sign, mantissa and exponent of a floating point number
C
Floating Point
Emulation
How to get the real and total length of char * (char array)?
C++
C
Arrays
Pointers
Char
Are pointers considered a method of calling by reference in C?
C
Pointers
Pass by-Reference
How does the compiler allocate memory without knowing the size at compile time?
C
Arrays
Memory
C99
Variable Length-Array
How could I graphically display the memory layout from a .map file?
C++
C
Linker
Is ncurses available for windows?
C++
C
Ncurses
What is the difference between read() and fread()?
C
File
File Io
What exactly is va_end for? Is it always necessary to call it?
C++
C
Variadic Functions
Convert a Static Library to a Shared Library?
C
Linux
Shared Libraries
Static Libraries
Passing variable number of arguments around
C
Variadic Functions
Compile a DLL in C/C++, then call it from another program
C++
C
Gcc
Vb6
Mingw
Are there any platforms where pointers to different types have different sizes?
C
Pointers
Sizeof
sem_init on OS X
C
Macos
Pthreads
Semaphore
Why is argc an 'int' (rather than an 'unsigned int')?
C++
C
Command Line
Can I get Unix's pthread.h to compile in Windows?
C
Windows
Multithreading
Pthreads
Why won't extern link to a static variable?
C
Static
Extern
Detached vs. Joinable POSIX threads
C
Linux
Pthreads
Detach
Contents of a static library
C++
C
Gcc
Static Libraries
Object Files
What's the point of const void?
C++
C
Function
Constants
Void
How to check what shared libraries are loaded at run time for a given process?
C++
C
Linux
Shared Libraries
Programming languages that compile into C/C++ source?
C++
C
Programming Languages
Code Translation
I have Python on my Ubuntu system, but gcc can't find Python.h
Python
C
Ubuntu
Header
How to recursively list directories in C on Linux?
C
Linux
Recursion
Is type-punning through a union unspecified in C99, and has it become specified in C11?
C
C99
Unions
C11
Type Punning
Get the compiler options from a compiled executable?
C++
C
Linux
Can a near-zero floating value cause a divide-by-zero error?
C++
C
Floating Point
Divide by-Zero
Difference between section and task openmp
C
Parallel Processing
Openmp
Parallel for vs omp simd: when to use each?
C++
C
Performance
Openmp
Simd
When is uint8_t ≠ unsigned char?
C++
C
Types
Unsigned Char
Uint8t
In C, sizeof operator returns 8 bytes when passing 2.5m but 4 bytes when passing 1.25m * 2
C
Sizeof
How was the first C compiler written?
C
Assembly
Compiler Construction
Can we use C code in Python?
Python
C
Linux
Compiler Construction
How to get absolute value from double - c-language
C
Double
How does the C preprocessor handle circular dependencies?
C
Linux
Gcc
C Preprocessor
Empty loop is slower than a non-empty one in C
C
Performance
Loops
How does this C program compile and run with two main functions?
C
Gcc
Main
Can I have Swift, Objective-C, C and C++ files in the same Xcode project?
C++
Objective C
C
Swift
Bridging Header
Using if (!!(expr)) instead of if (expr)
C
Expression
Is it bad to declare a C-style string without const? If so, why?
C++
C
C Strings
How to add a builtin function in a GCC plugin?
C
Gcc
Built In
Gcc Plugins
In a GNU C macro envSet(name), what does (void) "" name mean?
C
Gcc
Macros
C Preprocessor
Why is -(-2147483648) = - 2147483648 in a 32-bit machine?
C
32 Bit
Twos Complement
How do you do exponentiation in C?
C
Difference between files written in binary and text mode
C++
C
File Io
What is the best IDE for C Development / Why use Emacs over an IDE?
C
Ide
How do I work with dynamic multi-dimensional arrays in C?
C
Arrays
Dynamic
Why do I always get the same sequence of random numbers with rand()?
C
Random
Download file using libcurl in C/C++
C
File
Download
Libcurl
How to print pthread_t
C++
C
Linux
Pthreads
Why does open() create my file with the wrong permissions?
C
Unix
File Io
find if 4 points on a plane form a rectangle?
C
Algorithm
Geometry
Efficiency: arrays vs pointers
C
Arrays
Pointers
Performance
Memory Access
How do I run a C program from VIM?
C
Vim
Hexadecimal string to byte array in C
C
String
How to execute a shell script from C in Linux?
C
Linux
Shell
Split string in C every white space
C
What is the difference between using _exit() & exit() in a conventional Linux fork-exec?
C
Linux
Return
Fork
Exit
Multi-line DEFINE directives?
C++
C
Compiler Construction
How do I share a global variable between c files?
C
Extern
What does a dot before the variable name in struct mean?
C
Linux
Kernel
How to read string from keyboard using C?
C
String
Scanf
Can a C macro definition refer to other macros?
C
C Preprocessor
Strings and character with printf
C
Printf
How does GCC optimize out an unused variable incremented inside a loop?
C
Gcc
Compiler Optimization
Disassembly
Efficient integer compare function
C
Assembly
X86
Inline Assembly
Are the results of bitwise operations on signed integers defined?
C
Bitwise Operators
how to print __uint128_t number using gcc?
C
Gcc
Point in Polygon Algorithm
C
Algorithm
EXIT_FAILURE vs exit(1)?
C
Exit
How to set include path in xcode project
C
Xcode
Include
Environment Variables
Is it better to avoid using the mod operator when possible?
C
Performance
Optimization
Modulo
What is 1LL or 2LL in C and C++?
C++
C
Math
Long Integer
Cmath
Whats the difference between UInt8 and uint8_t
C++
Objective C
C
Do I need to compile the header files in a C program?
C
Gcc
C : typedef struct name {...}; VS typedef struct{...} name;
C
Struct
Typedef
undefined reference when calling inline function
C
Function
Undefined
Inline
Header Files
Getting a weird percent sign in printf output in terminal with C
C
Printf
Zsh
Does free() set errno?
C
Linux
Memory Management
Is a C compiler allowed to coalesce sequential assignments to volatile variables?
C
Language Lawyer
Compiler Optimization
Volatile
Why use hex?
C++
C
Hex
What registers to save in the ARM C calling convention?
C
Assembly
Arm
Calling Convention
Function Call
How to estimate the thread context switching overhead?
C++
C
Multithreading
Windows Mobile
Question about a function definition (three dots in parameters..)
C++
C
Objective-C sample code for HMAC-SHA1
C
Objective C
Sha1
Hmac
How does "while(*s++ = *t++)" copy a string?
C
Is char guaranteed to be exactly 8-bit long?
C
Types
Char
List of all users and groups
C
Objective C
Cocoa
Macos
Macos Carbon
Converting between C++ std::vector and C array without copying
C++
C
Arrays
Stl
Stdvector
How can I copy a file on Unix using C?
C
Unix
Copy
How to set the name of a thread in Linux pthreads?
C
Linux
Pthreads
Meaning of U suffix
C++
C
How to split a C program into multiple files?
C
Codeblocks
Convert javascript code to c code
Javascript
C
Compiler Construction
What is the Log API to call from an Android JNI program?
Android
C
Android Emulator
Android Ndk
call printf using va_list
C
Printf
Variadic Functions
How do we check if a pointer is NULL pointer?
C
Null Pointer
Correctness of Sakamoto's algorithm to find the day of week
C
Algorithm
Dayofweek
Correctness
Pre & post increment operator behavior in C, C++, Java, & C#
C#
Java
C++
C
What is the difference between static_cast and reinterpret_cast?
C++
C
Casting
Struct
Long Vs. Int C/C++ - What's The Point?
C++
C
Integer
Long Integer
How do function pointers in C work?
C
Function Pointers
What is the difference between char * const and const char *?
C
Pointers
Constants
Should I return 0 or 1 for successful function?
C
Boolean
What does this GCC error "... relocation truncated to fit..." mean?
C
Eclipse
Memory Management
Gcc
Embedded
CMAKE - How to properly copy static library's header file into /usr/include?
C
Cmake
Static Libraries
Difference between int main() and int main(void)?
C
Main
Void
segmentation fault : 11
C
Segmentation Fault
Using pointers to remove item from singly-linked list
C
Pointers
Linked List
c - warning: implicit declaration of function ‘printf’
C
How are variable names stored in memory in C?
C
Variables
Memory
Symbol Table
Using make with -j4 or -j8
C
Opencv
Makefile
What is the difference between a Linux platform driver and normal device driver?
C
Linux
Linux Kernel
Linux Device-Driver
C99 inline function in .c file
C
C99
Why does MSVS not optimize away +0?
C
Floating Point
Why do we cast sockaddr_in to sockaddr when calling bind()?
C
Linux
Sockets
How memset initializes an array of integers by -1?
C++
C
Arrays
Twos Complement
Memset
Why is assert a macro and not a function?
C
Assert
C Preprocessor
Pointer declared as constant as well as volatile
C
Constants
Volatile
What is the difference between casting to `float` and adding `f` as a suffix when initializing a `float`?
C
Casting
Floating Point
What does the integer suffix J mean?
C++
C
Integer
Suffix
C vs C++ struct alignment
C++
C
Pointers
Struct
Object Layout
"Use of a signed integer operand with a binary bitwise operator" - when using unsigned short
C
Clion
Clang Tidy
Why does double in C print fewer decimal digits than C++?
C++
C
Floating Point
Numbers
Precision
Why can't the C compiler optimize changing the value of a const pointer assuming that two pointers to the same variable would be illegal/UB?
C
Rust
Undefined Behavior
Strict Aliasing
I need a way in a C preprocessor #if to test if a value will create a 0-size array
C
Preprocessor
makefiles - compile all c files at once
C
Makefile
Why aren't my compile guards preventing multiple definition inclusions?
C
Linker
Multiple Inclusions
How to get function's name from function's pointer in Linux kernel?
C
Linux Kernel
Function Pointers
Should a buffer of bytes be signed or unsigned char buffer?
C++
C
Char
Buffer
The ternary (conditional) operator in C
C
Operators
Ternary Operator
Conditional Operator
Is it possible to store the address of a label in a variable and use goto to jump to it?
C
Pointers
Label
Goto
Memory Address
size of struct in C
C
Struct
Structure Packing
What defines an opaque type in C, and when are they necessary and/or useful?
C
Types
How can I benchmark C code easily?
C
Benchmarking
Can I share a file descriptor to another process on linux or are they local to the process?
C
Linux
Must declare function prototype in C?
C
Function
Function Prototypes
What does 'unsigned temp:3' in a struct or union mean?
C++
C
Bit Fields
Colon
faster alternative to memcpy?
C
Performance
Memcpy
Best way to invoke gdb from inside program to print its stacktrace?
C
Linux
Gdb
Stack Trace
Tell gcc to specifically unroll a loop
C
Gcc
Pragma
Unroll
Where are C/C++ main function's parameters?
C++
C
Parameters
Location
Main
Double pointer const-correctness warnings in C
C
Constants
Implicit Conversion
Qualifiers
Multiple Indirection
Does true equal to 1 and false equal to 0?
C++
C
Boolean
How to create a single instance application in C or C++
C++
C
Linux
Single Instance
Can GCC not complain about undefined references?
C
Gcc
Compiler Errors
Compiler Warnings
What is the function of "(void) (&_min1 == &_min2)" in the min macro in kernel.h?
C
Linux Kernel
Difference between uint and unsigned int?
C
Gcc
Uint
How to trigger SIGUSR1 and SIGUSR2?
C
Signals
How are asynchronous signal handlers executed on Linux?
C
Linux
Signals
Signal Handling
What is time(NULL) in C?
C
Time
When are anonymous structs and unions useful in C11?
C
Struct
C11
c array - warning: format not a string literal
C
Compiler Warnings
Time in milliseconds in C
C
Time
Clock
What is GLIBC? What is it used for?
C
Gnu
Glibc
Standard Library
Is there any reason not to use fixed width integer types (e.g. uint8_t)?
C
Integer
Byte
Sizeof
C99
What's the purpose of using braces (i.e. {}) for a single-line if or loop?
C++
C
Coding Style
Curly Braces
Defensive Programming
Is uninitialized local variable the fastest random number generator?
C++
C
Undefined Behavior
Garbage
Detecting superfluous #includes in C/C++?
C++
C
Refactoring
Include
Dependencies
C/C++ include header file order
C++
C
How do I link object files in C? Fails with "Undefined symbols for architecture x86_64"
C
Gcc
Compilation
C# performance - Using unsafe pointers instead of IntPtr and Marshal
C#
C
Pinvoke
Marshalling
Unsafe
Weak symbol aliases on OS X similar to those on Linux, or a closest equivalent?
C
Linux
Macos
Linker
Dynamic Linking
Do negative numbers return false in C/C++?
C++
C
Boolean
Does any C library implement C11 threads for GNU/Linux?
C
Multithreading
C11
Is accessing a global array outside its bound undefined behavior?
C
Undefined Behavior
Xlib and Firefox behavior
C
X11
Xlib
In C, how would I choose whether to return a struct or a pointer to a struct?
C
Pointers
Struct
Malloc
Why are the memory addresses of string literals so different from others', on Linux?
C
Linux
Memory
Memory Address
String Literals
What's the difference between const array and static const array in C/C++
C++
C
Arrays
Static
Constants
How is numpy so fast?
C++
Arrays
C
Performance
Numpy
How can I create a dynamically sized array of structs?
C
Dynamic
Memory Management
Namespaces in C
C++
C
Namespaces
C Preprocessor
How to extract the decimal part from a floating point number in C?
C
Floating Point
Decimal
Numbers
Alternatives to Autoconf and Autotools?
C
Autotools
Autoconf
Determining C executable name
C
Gcc
Compilation
Executable
Linkage
What's sizeof(size_t) on 32-bit vs the various 64-bit data models?
C
64 Bit
Sizeof
Size T
Call a function named in a string variable in C
C
Function
Why do round() and ceil() not return an integer?
C++
C
Casting
Rounding
How to print a null-terminated string with newlines without showing backslash escapes in gdb?
C
Debugging
Gdb
Visual C++ equivalent of GCC's __attribute__ ((__packed__))
C++
C
Visual C++
Gcc
Data Structures
What is the maximum length in chars needed to represent any double value?
C++
C
Floating Point
Why should I always enable compiler warnings?
C++
C
Warnings
Compiler Warnings
C++ Faq
C default arguments
C
Arguments
Default Parameters
Size of character ('a') in C/C++
C++
C
Types
Difference between shared objects (.so), static libraries (.a), and DLL's (.so)?
C++
C
Linux
Dll
Linker
How to use #if inside #define in the C preprocessor?
C
C Preprocessor
Type-safe generic data structures in plain-old C?
C
Generics
Data Structures
Code Generation
What does tilde(~) operator do?
C
Cryptography
What does "Ex" stand for in Windows API function names?
C
Windows
Api
Shared Libraries
hello world in C without semicolons and without IF/WHILE/FOR statements
C
Puzzle
What does it mean to align the stack?
C
Assembly
Gcc
X86
Memory Alignment
How does a 'const struct' differ from a 'struct'?
C
Syntax
How to access a local variable from a different function using pointers?
C++
C
Pointers
Local Variables
How do I execute an external program within C code in Linux with arguments?
C
Linux
What is the difference between xmalloc and malloc?
C
Undefined reference to main - collect2: ld returned 1 exit status
C
Gcc
Reference
get absolute value without using abs function nor if statement
C++
C
Bit Manipulation
Why memory functions such as memset, memchr... are in string.h, but not in stdlib.h with another mem functions?
C
Function
Memory
Header
Why is matrix multiplication faster with numpy than with ctypes in Python?
Python
C
Benchmarking
Matrix Multiplication
Why is sin_addr inside the structure in_addr?
C
Sockets
Unix
Working of __asm__ __volatile__ ("" : : : "memory")
C
Gcc
Arm
Embedded Linux
Volatile
%i or %d to print integer in C using printf()?
C
Console
Integer
Int
Printf
Extending a struct in C
C
Struct
Why use double indirection? or Why use pointers to pointers?
C
Pointers
Is 0 an octal or a decimal in C?
C
Language Lawyer
Literals
Octal
Crash or "segmentation fault" when data is copied/scanned/read to an uninitialized pointer
C
Pointers
Segmentation Fault
Is unevaluated division by 0 undefined behavior?
C++
C
Language Lawyer
Will printf still have a cost even if I redirect output to /dev/null?
C
Linux
Performance
Embedded
Dev Null
What does ((void (*)())buf)(); mean?
C
Function
Pointers
Function Pointers
Why can't I convert 'char**' to a 'const char* const*' in C?
C
Pointers
Constants
Const Correctness
When is it ok to use a global variable in C?
C
Global Variables
Pointer Arithmetic
C
Pointers
Pointer Arithmetic
Using a C++ class member function as a C callback function
C++
C
Interop
Callback
Is the sizeof(enum) == sizeof(int), always?
C
Enums
Constants
C Preprocessor
Get list of static libraries used in an executable
C++
C
Unix
Static
Linker
Does the C preprocessor strip comments or expand macros first?
C
Comments
C Preprocessor
C99
Removing a non empty directory programmatically in C or C++
C++
C
Does C support overloading?
C
What are *-devel packages?
C
C warning implicit declaration of function 'exit'
C
Gcc Warning
How can I create C header files
C
Function
Header Files
Modular
How to implement a timeout in read() function call?
C
Linux
Pointer subtraction confusion
C
What is the fundamental difference between source and header files in C?
C
Opaque C structs: various ways to declare them
C
Coding Style
Struct
Typedef
Opaque Pointers
In C, what does a variable declaration with two asterisks (**) mean?
C
Pointers
How to assign pointer address manually in C programming language?
C
Memory
Pointers
How to assign a C struct inline?
C++
C
Struct
What do R_X86_64_32S and R_X86_64_64 relocation mean?
C
Compiler Construction
Linker
Elf
Relocation
OpenMP: are local variables automatically private?
C++
C
Parallel Processing
Openmp
Specifying multiple files with LD_PRELOAD
C
Linux
Dynamic
X86
Determine if char is a num or letter
C
Char
Alphanumeric
How to specify 64 bit integers in c
C
64 Bit
Sizeof
Unix socket, SOCK_SEQPACKET vs SOCK_DGRAM
C
Unix
Fast computing of log2 for 64-bit integers
C
64 Bit
Bit Manipulation
32bit 64bit
Lookup
Changing address contained by pointer using function
C
Function
Pointers
Reading in double values with scanf in c
C
Scanf
Conversion Specifier
Does a static function need the static keyword for the prototype in C?
C
Static Functions
Reasoning behind C sockets sockaddr and sockaddr_storage
C
Sockets
Unix
Append to the end of a file in C
C
File
Append
Fseek
C job interview - casting and comparing
C
Casting
Char
Int
How to invoke function from external .c file in C?
C
Function
External
How to create a C project with CLion
C++
C
Cmake
Clion
How to detect reliably Mac OS X, iOS, Linux, Windows in C preprocessor?
C++
C
Cross Platform
C Preprocessor
Os Detection
This C function should always return false, but it doesn’t
C
Gcc
Why GCC compiled C program needs .eh_frame section?
C
Assembly
Exception Handling
X86
Elf
Why does declaring main as an array compile?
C
Gcc
Clang
Main
Are C/C++ fundamental types atomic?
C++
C
Multithreading
Atomic
"error: assignment to expression with array type error" when I assign a struct field (C)
C
Arrays
String
Struct
Initialization
What is the need of empty braces '{ }' at the end of array of structs?
C
Arrays
Struct
Linux Kernel
What is the full "for" loop syntax in C?
C
Syntax
For Loop
Has anyone ever had a use for the __COUNTER__ pre-processor macro?
C++
C
String input to flex lexer
C
Bison
Yacc
Lex
Flex Lexer
How to truncate a file in C?
C
File
Truncate
Truncation
How to simulate an EOF?
C
Eof
Getchar
Kernighan and-Ritchie
C: for loop int initial declaration
C
For Loop
Gcc
Syntax Error
Concatenating strings in C, which method is more efficient?
C
String
Performance
Concatenation
initial value of int array in C
C
Arrays
Compiler Construction
Where are constant variables stored in C?
C
Variables
Memory Management
Constants
Global
How do I gaussian blur an image without using any in-built gaussian functions?
C
Image Processing
Gaussianblur
How to raise warning if return value is disregarded?
C++
C
Gcc
Static Analysis
Copying a part of a string (substring) in C
C
How do you query a pthread to see if it is still running?
C
Multithreading
Concurrency
Pthreads
Destructor
What is the fastest way to find if a number is even or odd?
C
Micro Optimization
constant variables not working in header
C++
C
Visual Studio
Visual Studio-2008
Visual C++
What does "WINAPI" in main function mean?
C++
C
Windows
Winapi
Winmain
gcc, strict-aliasing, and horror stories
C
Gcc
Strict Aliasing
How can I correctly assign a new string value?
C
String
Struct
Strcpy
Checking if a directory exists in Unix (system call)
C++
C
Unix
Directory
Exists
What does the symbol \0 mean in a string-literal?
C++
C
String
Escaping
String Literals
'printf' with leading zeros in C
C
Formatting
Printf
max value of integer
Java
C
Integer
Max
Bit
Stack smashing detected
C
Exception
Stack
Core dumped, but core file is not in the current directory?
C
Linux
Coredump
Is memory allocation a system call?
C++
C
Operating System
Heap Memory
Warning: ignoring return value of 'scanf', declared with attribute warn_unused_result
C
why does accessing an element in an array take constant time?
C
Arrays
Time
Constants
Complexity Theory
How to convert string to float?
C
Floating Point
Type Conversion
Atof
Strtod
how does malloc understand alignment?
C++
C
Memory Alignment
Is there a good reason for always enclosing a define in parentheses in C?
C
C Preprocessor
Parentheses
Is it possible to convert char[] to char* in C?
C
Char
Define functions in structs
C
Can I define a function inside a C structure?
C
Function
Structure
Can you have a triple minus signs in C programming? What does it mean?
C++
C
Simple way to check if a string contains another string in C?
C
String
Substring
Why is this an undefined behavior?
C++
C
Undefined Behavior
Can a const variable be used to declare the size of an array in C?
C
Arrays
Constants
How do I use typedef and typedef enum in C?
C
Typedef
Why Swift is 100 times slower than C in this image processing test?
C
Macos
Performance
Swift
Does &((struct name *)NULL -> b) cause undefined behaviour in C11?
C
Language Lawyer
C11
Offsetof
How do I use valgrind to find memory leaks?
C
Valgrind
Printing 1 to 1000 without loop or conditionals
C++
C
Printf
Why do I get a segmentation fault when writing to a "char *s" initialized with a string literal, but not "char s[]"?
C
Segmentation Fault
C Strings
When should I use mmap for file access?
C
File Io
Posix
Mmap
Fast ceiling of an integer division in C / C++
C++
C
Algorithm
Math
Why does `int ;` compile fine in C, but not in C++?
C++
C
Gcc
Language Lawyer
Variable Declaration
Fast way to generate pseudo-random bits with a given probability of 0 or 1 for each bit
C++
C
Algorithm
Random
Bit Manipulation
How to call machine code stored in char array?
C++
C
Linux
Native
Machine Code
How to create type safe enums?
C
Enums
Type Safety
How to properly add hex escapes into a string-literal?
C
C99
"fatal error: bits/libc-header-start.h: No such file or directory" while compiling HTK
C
Makefile
Htk
What is the best encryption library in C/C++?
C++
C
Encryption
C: pointer to struct in the struct definition
C
Struct
Pointers
Difference between void main and int main in C/C++?
C++
C
Function
Standards
Main
Getting IPV4 address from a sockaddr structure
C
Ip Address
what's the difference between the printf and vprintf function families, and when should I use one over the other?
C
What does a colon in a struct declaration mean, such as :1, :7, :16, or :32?
C++
C
Bit Fields
Why isn't C/C++'s "#pragma once" an ISO standard?
C++
C
Pragma
Include Guards
How do I find the next multiple of 10 of any integer?
C
Algorithm
Math
Writing BMP image in pure c/c++ without other libraries
C++
C
Image
Graphics
Bmp
Could I ever want to access the address zero?
C++
C
Memory
Pointers
Maximum memory which malloc can allocate
C
Memory Management
Operating System
Malloc
Cpu Architecture
How do I print a #defined constant in GDB?
C
Gdb
C Preprocessor
Dropping root privileges
C
Unix
Root
In C, how is the main() method initially called?
C
Operating System
Where is ptrdiff_t defined in C?
C
Types
Libc
Stdint
How does C-- compare to LLVM?
C
Compiler Construction
Code Generation
Llvm
C Minus-Minus
Does C have references?
C
Reference
Why is my power operator (^) not working?
C++
C
What's the difference between GNU99 and C99 (Clang)?
C
Compiler Construction
Option
Clang
How to escape the % (percent) sign in C's printf
C
Printf
Format String
strdup() - what does it do in C?
C
Function
Strdup
what happens in the kernel during malloc?
C
Linux
Process
Heap Memory
System
What does posix_memalign/memalign do
C
Memory
Memory Pool
What is the maximum number of characters for a host-name in Unix?
C
Unix
Max
Hostname
What is the maximum size of an array in C?
C
Arrays
Launch Failed Binary not found Eclipse for C in Windows
C
Windows
Eclipse
error C2275 : illegal use of this type as an expression
C
Visual Studio-2010
Winapi
Service
Compiler Errors
Passing struct to function
C
Function
Struct
Single, double quotes and sizeof('a') in C/C++
C++
C
Gcc
How to check if a given file descriptor stored in a variable is still valid?
C
Linux
Gcc
File Descriptor
Representing EOF in C code?
C
Character
Ascii
Eof
Size of stack and heap memory
C
Memory Management
Heap Memory
Stack Memory
Are empty macro definitions allowed in C? How do they behave?
C
C Preprocessor
How do get numbers to display as two digits in C?
C
Digit
Why use address of first element of struct, rather than struct itself?
C
Struct
Performance Tradeoff - When is MATLAB better/slower than C/C++
C++
C
Performance
Matlab
What is IACA and how do I use it?
C++
C
Performance
Assembly
Iaca
Compiler not detecting obviously uninitialized variable
C
Why does the complement behave differently through printf?
C
Variables
Types
Bitwise Operators
Unsigned Char
What is the difference between .o, .a, and .so files?
C++
C
Shared Libraries
Static Libraries
When should I pass or return a struct by value?
C
Shallow Copy