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

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

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 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 Check If a File Exists in C++ and C

Learn standard ways to check whether a file exists in C++11, C++17, and C, with examples, trade-offs, pitfalls, and practical usage tips.

ccppfilestream

How to Detect Unsigned Integer Overflow in C++

Learn how to detect unsigned integer overflow in C++ safely, with multiplication checks, examples, pitfalls, and practical patterns.

ccppinteger-overflow

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 Divide a Number by 3 Without Using Arithmetic Operators

Learn how to divide a signed or unsigned number by 3 without using *, /, +, -, or % by using bitwise operations and repeated subtraction.

cmathbit-manipulationdivision

How to Generate a Random Integer in C

Learn how to generate random integers in C using rand(), srand(), ranges, examples, pitfalls, and better options for real programs.

crandom

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

Page 1 of 4 - 62 questions

PreviousNext