Top "C" questions

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

How to resolve the "EVP_DecryptFInal_ex: bad decrypt" during file decryption

I have the following query.Could any one please suggest me a solution. I'm working on encryption and decryption of …

c encryption openssl
GDB: break if variable equal value

I like to make GDB set a break point when a variable equal some value I set, I tried this …

c gdb
How do I share a global variable between c files?

If i define a global variable in a .c file, how can i use the value of the same variable …

c extern
C - freeing structs

Let's say I have this struct typedef struct person{ char firstName[100], surName[51] } PERSON; and I am allocating space by malloc …

c struct malloc
Best timing method in C?

What is the best way to time a code section with high resolution and portability? /* Time from here */ ProcessIntenseFunction(); /* to …

c performance timer timing
Checking if float is an integer

How can I check if a float variable contains an integer value? So far, I've been using: float f = 4.5886; if (…

c floating-point int
Struct memory layout in C

I have a C# background. I am very much a newbie to a low-level language like C. In C#, struct's …

c struct memory-layout
How to compare strings in C conditional preprocessor-directives

I have to do something like this in C. It works only if I use a char, but I need …

c conditional c-preprocessor
Why GDB jumps unpredictably between lines and prints variables as "<value optimized out>"?

Can anyone explain this behavior of gdb? 900 memset(&new_ckpt_info,'\0',sizeof(CKPT_INFO)); (gdb) **903 prev_offset = …

c optimization compiler-construction gdb compilation
How to print pthread_t

Searched, but don't come across a satisfying answer. I know there's no a portable way to print a pthread_t. …

c++ c linux pthreads