Top "C" questions

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

Determining C executable name

When we are compiling a C program the output is stored in a.out. How can we redirect the compiled …

c gcc compilation executable linkage
return statement vs exit() in main()

Should I use exit() or just return statements in main()? Personally I favor the return statements because I feel it's …

c++ c coding-style return exit
How do free and malloc work in C?

I'm trying to figure out what would happened if I try to free a pointer "from the middle" for example, …

c memory free malloc
How are multi-dimensional arrays formatted in memory?

In C, I know I can dynamically allocate a two-dimensional array on the heap using the following code: int** someNumbers = …

c arrays memory data-structures stack-memory
Receiving RTSP stream using FFMPEG library

I have an IPCamera on my LAN streaming video using RTSP. I have been able to capture and display it …

c++ c ffmpeg rtsp ip-camera
Result of 'sizeof' on array of structs in C?

In C, I have an array of structs defined like: struct D { char *a; char *b; char *c; }; static struct …

c arrays struct sizeof
C: Cannot initialize variable with an rvalue of type void*

I have the following code: int *numberArray = calloc(n, sizeof(int)); And I am unable to understand why I receive …

c pointers variable-initialization
I'm very confused about malloc() and calloc() on C

I've always programmed in Java, which is probably why I'm so confused about this: In Java I declare a pointer: …

c arrays malloc calloc
How to take command line argument in Codeblock 10.05?

I am writing a C code in codeblock version 10.05. The program is: int main(int argc , char *argv[]) { printf("Entered …

c environment
How to concatenate twice with the C preprocessor and expand a macro as in "arg ## _ ## MACRO"?

I am trying to write a program where the names of some functions are dependent on the value of a …

c concatenation token c-preprocessor