Top "C" questions

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

How do I determine the size of my array in C?

How do I determine the size of my array in C? That is, the number of elements the array can …

c arrays memory
How to initialize all members of an array to the same value?

I have a large array in C (not C++ if that makes a difference). I want to initialize all members …

c arrays initialization array-initialize
Convert char to int in C and C++

How do I convert a char to an int in C and C++?

c++ c gcc
How to generate a random int in C?

Is there a function to generate a random int number in C? Or will I have to use a third …

c random
Using boolean values in C

C doesn't have any built-in boolean types. What's the best way to use them in C?

c boolean
C: What is the difference between ++i and i++?

In C, what is the difference between using ++i and i++, and which should be used in the incrementation block …

c for-loop post-increment pre-increment
Correct format specifier for double in printf

What is the correct format specifier for double in printf? Is it %f or is it %lf? I believe it's %…

c floating-point printf double format-specifiers
How do I concatenate const/literal strings in C?

I'm working in C, and I have to concatenate a few things. Right now I have this: message = strcat("TEXT ", …

c string concatenation
How do I create an array of strings in C?

I am trying to create an array of strings in C. If I use this code: char (*a[2])[14]; a[0]="blah"; …

c arrays string