Top "C" questions

C is a general-purpose programming language used for system programming (OS and embedded), libraries, games and cross-platform.

Difference between static memory allocation and dynamic memory allocation

I would like to know what is the difference between static memory allocation and dynamic memory allocation? Could you explain …

c memory memory-management dynamic-memory-allocation static-memory-allocation
Is there a replacement for unistd.h for Windows (Visual C)?

I'm porting a relatively simple console program written for Unix to the Windows platform (Visual C++ 8.0). All the source files …

c++ c windows portability unistd.h
Why does scanf() need "%lf" for doubles, when printf() is okay with just "%f"?

Why is it that scanf() needs the l in "%lf" when reading a double, when printf() can use "%f" regardless …

c scanf length-modifiers
How do I base64 encode (decode) in C?

I have binary data in an unsigned char variable. I need to convert them to PEM base64 in c. I …

c base64
uint8_t vs unsigned char

What is the advantage of using uint8_t over unsigned char in C? I know that on almost every system …

c typedef
What is Bit Masking?

I am fairly new to C programming, and I encountered bit masking. Can someone explain to me the general concept …

c bit-manipulation bitwise-operators terminology bitmask
How to initialize array to 0 in C?

I need a big null array in C as a global. Is there any way to do this besides typing …

c arrays initialization
Range of values in C Int and Long 32 - 64 bits

I'm confused with range of values of Int variable in C. I know that a 32bits unsigned int have a …

c int 32bit-64bit
How can one print a size_t variable portably using the printf family?

I have a variable of type size_t, and I want to print it using printf(). What format specifier do …

c printf
What is the "assert" function?

I've been studying OpenCV tutorials and came across the assert function; what does it do?

c++ c assert