Top "C" questions

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

Unit Testing C Code

I worked on an embedded system this summer written in straight C. It was an existing project that the company …

c unit-testing testing embedded
How to open, read, and write from serial port in C?

I am a little bit confused about reading and writing to a serial port. I have a USB device in …

c linux serial-port
Improve INSERT-per-second performance of SQLite

Optimizing SQLite is tricky. Bulk-insert performance of a C application can vary from 85 inserts per second to over 96,000 inserts per …

c performance sqlite optimization
How to find the 'sizeof' (a pointer pointing to an array)?

First off, here is some code: int main() { int days[] = {1,2,3,4,5}; int *ptr = days; printf("%u\n", sizeof(days)); printf("%u\…

c arrays pointers sizeof
strdup() - what does it do in C?

What is the purpose of the strdup() function in C?

c function strdup
How do I list the symbols in a .so file

How do I list the symbols being exported from a .so file? If possible, I'd also like to know their …

c++ c gcc symbols name-mangling
Printing prime numbers from 1 through 100

This c++ code prints out the following prime numbers: 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97. But I don't think that's the way my book wants it …

c++ c algorithm primes
What is the proper #include for the function 'sleep()'?

I am using the Big Nerd Ranch book Objective-C Programming, and it starts out by having us write in C …

c posix sleep
How do I check if an integer is even or odd?

How can I check if a given number is even or odd in C?

c integer
clearing a char array c

I thought by setting the first element to a null would clear the entire contents of a char array. char …

c arrays char