Top "C" questions

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

List of all users and groups

I'm trying to get a list of all users and all groups on Mac OS X 10.5+. How can I do …

c objective-c cocoa macos macos-carbon
C warning implicit declaration of function 'exit'

This is my warning. implicit declaration of function 'exit' How i can remove it. i am using linux & gcc …

c gcc-warning
Using custom Makefile with Eclipse/CDT

I have a project of multiple .c and .h files and I write my own makefile. How can I configure …

c eclipse eclipse-cdt
In C how do you redirect stdin/stdout/stderr to files when making an execvp() or similar call?

I have the following code: pid_t pid = fork(); if (pid == -1) { // ... } else if (pid == 0) { stdin = someopenfile; stdout = someotherfile; stderr = …

c linux unix exec io-redirection
Macro vs Function in C

I always saw examples and cases where using a macro is better than using function. Could someone explain me with …

c function c-preprocessor
Making C code plot a graph automatically

I have written a program which writes a list of data to a '.dat' file with the intention of …

c gnuplot numerical-methods piping
How to remove first character from C-string?

Can anyone please help me? I need to remove the first character from a char * in C. For example, char * …

c string cstring
How to get fractions in an integer division?

How do you divide two integers and get a double or float answer in C?

c integer-division
How to create a typedef for function pointers

I think it would be easier to use function pointers if I created a typedef for a function pointer, but …

c function-pointers typedef
Casting a function pointer to another type

Let's say I have a function that accepts a void (*)(void*) function pointer for use as a callback: void do_…

c function-pointers