Questions

C questions

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

Array-to-Pointer Conversion in C and C++ Explained

Learn what array-to-pointer conversion means in C and C++, how array decay works, and how it differs from a pointer to an array.

ccpparrayspointers

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

C Pointer to Array vs Array of Pointers: How to Read Complex Declarations

Learn the difference between pointer-to-array and array-of-pointers in C, plus a simple rule for reading complex declarations correctly.

carrayspointersvariable-declaration

C printf Format Specifier for bool: How to Print Boolean Values

Learn how to print bool values in C with printf, why no %b/%B specifier exists, and the common patterns to print true/false or 0/1.

cbooleanprintf

Calling C or C++ from Python: Building Python Bindings

Learn the quickest ways to call C or C++ from Python, including ctypes, C extensions, Cython, and binding tools with practical examples.

ccpppython

Convert char to int in C and C++

Learn how to convert a char to an int in C and C++, including character codes, digit conversion, examples, mistakes, and practical usage.

ccppgcc

Correct Format Specifier for double in printf in C

Learn whether to use %f or %lf for double in printf in C, why it works, and how printf differs from scanf with float and double.

cfloating-pointprintfdouble

Debug vs Release in CMake: Build Types, Compiler Flags, and C vs C++ Compilation

Learn how CMake handles Debug and Release builds, compiler flags, and mixed C/C++ targets with clear examples for GCC projects.

ccppgcccmake

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

Dereferencing a Pointer in C and C++ Explained with Examples

Learn what dereferencing a pointer means in C and C++ with simple examples, syntax, common mistakes, and practical usage.

ccpppointersdereference

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 `char s[]` and `char *s` in C

Learn the difference between `char s[]` and `char *s` in C, including memory layout, storage duration, mutability, and runtime behavior.

cstringcharconstants

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

Difference Between struct and union in C

Learn the difference between struct and union in C, how memory is shared, when to use each, and common mistakes with clear examples.

cstructunions

Fixing "Undefined Reference to pthread_create" in C on Linux

Learn why C code using pthread_create fails to link on Linux and how to compile pthread programs correctly with gcc and -pthread.

clinuxmultithreadingpthreads

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

Float vs Double: Difference in Precision, Range, and Memory

Learn the difference between float and double, when they are interchangeable, and how precision, range, and memory affect results.

ccppfloating-pointprecision

How C free() Knows What to Free: Heap Metadata and Dynamic Memory

Learn how C free() knows what memory block to release, how allocators store size metadata, and why arrays still need lengths.

cpointersfree

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

Page 1 of 6 - 112 questions

PreviousNext