Top "C" questions

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

How to determine CPU and memory consumption from inside a process?

I once had the task of determining the following performance parameters from inside a running application: Total virtual memory available …

c++ c memory cpu
What is a bus error?

What does the "bus error" message mean, and how does it differ from a segfault?

c unix segmentation-fault bus-error
Write applications in C or C++ for Android?

I'm trying to develop/port a game to Android, but it's in C, and Android supports Java, but I'm sure …

c++ c android
Is there an alternative sleep function in C to milliseconds?

I have some source code that was compiled on Windows. I am converting it to run on Red Hat Linux. …

c linux sleep
How do you reverse a string in place in C or C++?

How do you reverse a string in C or C++ without requiring a separate buffer to hold the reversed string?

c++ c string reverse
What is the difference between NULL, '\0' and 0?

In C, there appear to be differences between various values of zero -- NULL, NUL and 0. I know that the …

c pointers null
How to generate a random integer number from within a range

This is a follow on from a previously posted question: How to generate a random number in C? I wish …

c random
Returning a C string from a function

I am trying to return a C string from a function, but it's not working. Here is my code. char …

c
How would one write object-oriented code in C?

What are some ways to write object-oriented code in C? Especially with regard to polymorphism. See also this Stack Overflow …

c oop object
What causes the Broken Pipe Error?

I know that broken pipe error is thrown when the socket on the peer side is closed. But, in my …

c broken-pipe