Questions

C questions

Choose a question page, learn the concept, then test your understanding with a quiz.

Building More Fault-Tolerant Embedded C++ Applications for Radiation-Prone ARM Systems

Learn practical C++ and compile-time techniques to reduce soft-error damage in embedded ARM systems exposed to radiation.

ccppgccembedded

Definition vs Declaration in C and C++: What’s the Difference?

Learn the difference between declarations and definitions in C and C++ with simple examples, common mistakes, and practical usage.

ccppdeclarationterminology

Difference Between #include <...> and #include "..." in C and C++

Learn the difference between #include with angle brackets and quotes in C and C++, including search paths, examples, and common mistakes.

ccppincludeheader-files

Difference Between ++i and i++ in C

Learn the difference between pre-increment and post-increment in C, how they behave, and which one to use in a for loop.

cfor-looppost-incrementpre-increment

Difference Between malloc and calloc in C

Learn the difference between malloc and calloc in C, including memory initialization, syntax, use cases, and common mistakes.

cmalloccalloc

Fixing "missing separator" in a Makefile (GNU Make)

Learn why GNU Make shows "missing separator" and how to fix tabs, recipe syntax, and command formatting in a Makefile.

cmakefile

How Function Pointers Work in C: Syntax, Examples, and Practical Use

Learn how function pointers work in C with clear syntax, examples, callbacks, and common mistakes beginners should avoid.

cfunction-pointers

How sykes2.c Works: Explaining an Obfuscated C Program That Prints __TIME__

Learn how the obfuscated C program sykes2.c works, including recursion, __TIME__, bit tricks, indexing, and ASCII output in C.

cobfuscationdeobfuscation

How to Determine Array Size in C

Learn how to find the number of elements in a C array using sizeof, with examples, pitfalls, and best practices for beginners.

carrays

How to Improve SQLite INSERT Performance in C

Learn how to speed up SQLite bulk INSERTs in C using transactions, prepared statements, PRAGMAs, and better import patterns.

cperformancesqliteoptimization

How to Initialize All Elements of an Array to the Same Value in C

Learn how to initialize every array element to the same value in C, including loops, memset, and C initializer rules with examples.

carraysinitializationarray-initialize

How to Set, Clear, and Toggle a Single Bit in C

Learn how to set, clear, and toggle a single bit in C using bitwise operators with simple examples and common mistakes.

ccppbit-manipulationbitwise-operators

How to Use Boolean Values in C

Learn how Boolean values work in C, including `_Bool`, `stdbool.h`, true/false usage, examples, pitfalls, and best practices.

cboolean

How to Use extern to Share Variables Between Source Files in C

Learn what extern means in C, how to declare and define global variables across files, and how scope and linkage work in practice.

ccppglobal-variablesextern

Is < Faster Than <= in JavaScript? Understanding Comparison Performance

Learn whether < is faster than <= in JavaScript, how comparisons work, and when performance differences matter in real code.

ccppperformanceassembly

Should You Cast malloc in C? Understanding malloc Return Types

Learn whether to cast malloc in C, why it is usually avoided, and how to write safer dynamic memory allocation code.

cmalloccasting

Strict Aliasing Rule in C: What It Means and Why It Matters

Learn the strict aliasing rule in C, why breaking it causes undefined behavior, and how to safely reinterpret memory.

ccppundefined-behaviorstrict-aliasing

Undefined Behavior with Pre-Increment and Post-Increment in C

Learn why expressions like i = i++ + ++i are undefined behavior in C, how evaluation order works, and how to write safe code.

cincrementundefined-behavioroperator-precedence

Understanding `const int*`, `const int * const`, and `int * const` in C and C++

Learn the difference between pointer const forms in C and C++: `const int*`, `int* const`, and `const int* const` with clear examples.

ccpppointersconstants

Understanding the `-->` Pattern in C and C++

Learn why `while (x --> 0)` works in C and C++, how it is parsed, what operators are involved, and when to avoid this syntax.

ccppoperatorscode-formatting

Page 1 of 2 - 32 questions

PreviousNext