Top "C" questions

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

'readline/readline.h' file not found

I have included: #include "stdio.h" #include <readline/readline.h> #include <readline/history.h> and my …

c linux libreadline
How do I execute a Shell built-in command with a C function?

I would like to execute the Linux command "pwd" through a C language function like execv(). The issue is that …

c shell command exec pwd
Compiling an application for use in highly radioactive environments

We are compiling an embedded C++ application that is deployed in a shielded device in an environment bombarded with ionizing …

c++ c gcc embedded fault-tolerance
How to get absolute value from double - c-language

I want the absolute-value from a negative double - and I thought the abs-function was as easy to use as …

c double
Returning pointer from a function

I am trying to return pointer from a function. But I am getting segmentation fault. Someone please tell what is …

c pointers segmentation-fault
Where is `%p` useful with printf?

After all, both these statements do the same thing... int a = 10; int *b = &a; printf("%p\n",b); printf("%08…

c++ c printf
Detecting EOF in C

I am using the following C code to take input from user until EOF occurs, but problem is this code …

c stdio
Switch statement with returns -- code correctness

Let's say I have code in C with approximately this structure: switch (something) { case 0: return "blah"; break; case 1: case 4: return "…

c switch-statement correctness
C++ preprocessor __VA_ARGS__ number of arguments

Simple question for which I could not find answer on the net. In variadic argument macros, how to find the …

c++ c c-preprocessor variadic-macros
What integer hash function are good that accepts an integer hash key?

What integer hash function are good that accepts an integer hash key?

c algorithm hash