Top "C" questions

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

How do I find the location of the executable in C?

Is there a way in C/C++ to find the location (full path) of the current executed program? (The problem …

c++ c linux unix path
Capturing stdout from a system() command optimally

I'm trying to start an external application through system() - for example, system("ls"). I would like to capture its …

c++ c system stdout
Reading a register value into a C variable

I remember seeing a way to use extended gcc inline assembly to read a register value and store it into …

c gcc assembly inline-assembly cpu-registers
Ask GDB to list all functions in a program

How can you list all functions in a program with GDB?

c linux gcc gdb x86-64
How to write a simple Linux device driver?

I need to write an SPI Linux character device driver for omap4 from scratch. I know some basics of writing …

c linux linux-kernel linux-device-driver embedded-linux
Assigning memory to double pointer?

I am having trouble understanding how to assign memory to a double pointer. I want to read an array of …

c string pointers malloc double-pointer
How to programmatically cause a core dump in C/C++

I would like to force a core dump at a specific location in my C++ application. I know I can …

c++ c linux coredump abort
Difference between "system" and "exec" in Linux?

What is the difference between system and exec family commands? Especially I want to know which one of them creates …

c linux exec fork
How to generate core dump file in Ubuntu

I would like to know how to generate a core dump file in Ubuntu. I am using Ubuntu 8.04.1 and gcc …

c coredump
double free or corruption (fasttop)

The following section of my code gives me this messege when executing * glibc detected ./a.out: double free or corruption (…

c linked-list coredump double-free