C is a general-purpose computer programming language used for operating systems, libraries, games and other high performance work. This tag should be used with general questions concerning the C language, as defined in the ISO 9899:2011 standard. If applicable, include a version-specific tag such as c99 or c90 for questions relating to older language standards. C is distinct from C++ and it should not be combined with the C++ tag absent a rational reason.
I am new to GDB, so I have some questions: How can I look at content of the stack? Example: to see content of
I have an embedded application with a time-critical ISR that needs to iterate through an array of size 256 (pr
I believe I found a bug in GCC while implementing O'Neill's PCG PRNG. (Initial code on Godbolt'
In general, for int num, num++ (or ++num), as a read-modify-write operation, is not atomic. But I often see co
While writing an optimized ftol function I found some very odd behaviour in GCC 4.6.1. Let me show you the cod
I tried to compare the performance of inline assembly language and C++ code, so I wrote a function that add tw
I've been contemplating how to protect my C/C++ code from disassembly and reverse engineering. Normally
I've been reading about div and mul assembly operations, and I decided to see them in action by writing a
Using this example coming from wikipedia, in which DrawSquare() calls DrawLine(), (Note that this diagram h
Is a switch statement actually faster than an if statement? I ran the code below on Visual Studio 2010's
I was wondering how to use GCC on my C source file to dump a mnemonic version of the machine code so I could s
For example, int result; result = 125/100; or result = 43/100; Will result always be the floor of the
I've been poring through .NET disassemblies and the GCC source code, but can't seem to find anywhere
What is the most efficient way given to raise an integer to the power of another integer in C? // 2^3 pow(2,3
Is there a faster way than x >= start && x <= end in C or C++ to test if an integer is between t
I want a function that returns -1 for negative numbers and +1 for positive numbers. http://en.wikipedia.org/wi
Why does the C preprocessor in GCC interpret the word linux (small letters) as the constant 1? test.c: #incl