Top "C" questions

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

How to Declare a 32-bit Integer in C

What's the best way to declare an integer type which is always 4 byte on any platforms? I don't worry about …

c portability
Lex - How to run / compile a lex program on commandline

I am very new to Lex and Yacc. I have a Lex program. Example: wordcount.l I am using windows …

c lex
printf with leading zeros in C

I have a floating point number such as 4917.24. I'd like to print it to always have five characters before the …

c formatting printf
What does the scanf function return?

I know that the signature of the scanf function is: int scanf(const char *format, ...) What is the int value …

c scanf
What's the meaning of exception code "EXC_I386_GPFLT"?

What's the meaning of exception code EXC_I386_GPFLT? Does its meaning vary according to the situation? In that case, …

c++ c exc-bad-access
strcpy vs. memcpy

What is the difference between memcpy() and strcpy()? I tried to find it with the help of a program but …

c memcpy strcpy
How to find EOF through fscanf?

I am reading matrix through file with the help of fscanf(). How can i find EOF? Even if i try …

c scanf
Getting each individual digit from a whole integer

Let's say I have an integer called 'score', that looks like this: int score = 1529587; Now what I want to do …

c bitwise-operators
Portable way to check if directory exists [Windows/Linux, C]

I would like to check if a given directory exists. I know how to do this on Windows: BOOL DirectoryExists(…

c file directory file-exists