Top "C" questions

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

Dev C in Windows 8: gcc Internal Error

I am a teacher's assistant for a C programming class, and the instructor uses Dev C++ as the compiler for …

c++ c gcc compiler-construction dev-c++
get absolute value without using abs function nor if statement

I was thinking how to get the absolute value of an integer without using if statement nor abs(). At first …

c++ c bit-manipulation
How can I remove a flag in C?

There is a variable that holds some flags and I want to remove one of them. But I don't know …

c bit-manipulation flags
Are negative array indexes allowed in C?

I was just reading some code and found that the person was using arr[-2] to access the 2nd element …

c arrays
How to sort an array of string alphabetically (case sensitive, nonstandard collation)

I need a c language code to sort some strings and it should be case sensitive and for the same …

c sorting case-sensitive alphabetical
How to program an Arduino with C++

So lately I've been playing around with my Arduino and I was wondering if there was some way I could …

c++ c arduino
Print the structure fields and values in C

I am interested in printing the structure fields . Typedef struct { UINT32 thread_id; BOOL is_valid; }T_THREAD; Is there …

c printf structure
Checking if a pointer is allocated memory or not

Can we check whether a pointer passed to a function is allocated with memory or not in C? I have …

c pointers
How to render text in SDL2?

I was wondering how to render text with SDL2. I found an API called SDL_TTF and some tutorials, however …

c sdl-2
Difference between CC, gcc and g++?

What are the difference between the 3 compilers CC, gcc, g++ when compiling C and C++ code in terms of assembly …

c++ c gcc compilation