Top "C" questions

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

Compiling C-code from the Command Prompt in Windows?

I want to compile C code from the Command Prompt in Windows. I have added the environment variable to the …

c windows visual-studio compilation prompt
warning: incompatible implicit declaration of built-in function ‘printf’ [enabled by default]

I'm using the following C code: #include <unistd.h> #include <fcntl.h> #include <sys/types.…

c system-calls
NOT(~) vs NEGATION(!)

#include <iostream> using namespace std; int main(int argc, char *argv[]) { int i=-5; while(~(i)) { cout<&…

c++ c bitwise-operators logical-operators
What are the barriers to understanding pointers and what can be done to overcome them?

Why are pointers such a leading factor of confusion for many new, and even old, college level students in C …

c++ c pointers
How to write a signal handler to catch SIGSEGV?

I want to write a signal handler to catch SIGSEGV. I protect a block of memory for read or write …

c linux system-calls signal-handling mprotect
Why does 'fopen' return a NULL pointer?

I'm working on a simple file splitter/merger program in the C programming language. The problem is, for some reason …

c null fopen fwrite
Why are these constructs using pre and post-increment undefined behavior?

#include <stdio.h> int main(void) { int i = 0; i = i++ + ++i; printf("%d\n", i); // 3 i = 1; i = (i++); …

c increment undefined-behavior operator-precedence sequence-points
Struct assignment or memcpy?

If I want to replicate a structure in another one (in C), what are the pro&con's of : struct1 = …

c struct variable-assignment memcpy
why does %d stand for Integer?

I know this doesn't sound productive, but I'm looking for a way to remember all of the formatting codes for …

c formatting printf
GLib-CRITICAL **: Source ID XXX was not found when attempting to remove it

I made a treeview with a treestore as model. The window is shown as expected, but when I click in …

c gtk gtk2 gtktreeview