Top "C" questions

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

Flushing buffers in C

Should fflush() not be used to flush a buffer even if it is an output stream? What is it useful …

c buffer fflush
GCC fatal error: stdio.h: No such file or directory

I'm trying to compile a program in C on OS X 10.9 with GCC 4.9 (experimental). For some reason, I'm getting the …

c gcc stdio
Initialize/reset struct to zero/null

struct x { char a[10]; char b[20]; int i; char *c; char *d[10]; }; I am filling this struct and then using …

c struct initialization
What is the bit size of long on 64-bit Windows?

Not to long ago, someone told me that long are not 64 bits on 64 bit machines and I should always use …

c++ c windows 64-bit porting
Length of array in function argument

This is well known code to compute array length in C: sizeof(array)/sizeof(type) But I can't seem to …

c pointers
Creating a new directory in C

I want to write a program that checks for the existence of a directory; if that directory does not exist …

c linux directory
2D array values C++

I wanted to declare a 2D array and assign values to it, without running a for loop. I thought I …

c++ c multidimensional-array initialization shortcut
C - determine if a number is prime

I am trying to come up with a method that takes an integer and returns a boolean to say if …

c# c primes
What does it mean to write to stdout in C?

Does a program that writes to "stdout" write to a file? the screen? I don't understand what it means to …

c unix stdout
Append to the end of a file in C

I'm trying to append the contents of a file myfile.txt to the end of a second file myfile2.txt …

c file append fseek