Top "C" questions

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

Calculating elapsed time in a C program in milliseconds

I want to calculate the time in milliseconds taken by the execution of some part of my program. I've been …

c unix time system timer
kvm: module verification failed: signature and/or required key missing - tainting kernel

I'm using Ubuntu 14.04 LTS and kernel version 3.13.11.4. I'm trying to load patched KVM modules kvm and kvm-intel and I'm getting …

c linux linux-kernel kernel-module kvm
What is the purpose of the RBP register in x86_64 assembler?

So I'm trying to learn a little bit of assembly, because I need it for Computer Architecture class. I wrote …

c assembly x86-64 stack-pointer
Linux Kernel: System call hooking example

I'm trying to write some simple test code as a demonstration of hooking the system call table. "sys_call_table" …

c linux-kernel hook
I'm trying to understand getchar() != EOF

I'm reading The C Programming Language and have understood everything so far. However when I came across the getchar() and …

c eof getchar putchar
C: warning: excess elements in array initializer; near initialization for ‘xxx' ; expects ‘char *’, but has type ‘int’

I've some warnings while trying to compile program in C language: 13:20: warning: excess elements in array initializer [enabled by default] 13:20: …

c arrays char initializer
Spinlock versus Semaphore

What are the basic differences between a semaphore & spin-lock? When would we use a semaphore over a spin-lock?

c++ c linux unix operating-system
Using C Libraries for C++ Programs

I am trying to control Dynamixel servos using a GUI made using Qt. Dynamixel provides a C set of C …

c++ c robotics
Is there a difference between foo(void) and foo() in C++ or C?

Consider these two function definitions: void foo() { } void foo(void) { } Is there any difference between these two? If not, why …

c++ c arguments
What are the applications of the ## preprocessor operator and gotchas to consider?

As mentioned in many of my previous questions, I'm working through K&R, and am currently into the preprocessor. …

c c-preprocessor kernighan-and-ritchie stringification