Top "C" questions

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

'do...while' vs. 'while'

Possible Duplicates: While vs. Do While When should I use do-while instead of while loops? I've been programming for a …

c# c++ c while-loop do-while
forward declaration of a struct in C?

#include <stdio.h> struct context; struct funcptrs{ void (*func0)(context *ctx); void (*func1)(void); }; struct context{ funcptrs fps; }; …

c struct declaration forward
undefined reference to `std::ios_base::Init::Init()'

I write this code to read 3 files, TM is the size of square matrix, LER the No. of rows of …

c matrix coredump
How to turn off gcc compiler optimization to enable buffer overflow

I'm working on a homework problem that requires disabling compiler optimization protection for it to work. I'm using gcc 4.4.1 on …

c gcc buffer-overflow compiler-optimization
How to remove unused C/C++ symbols with GCC and ld?

I need to optimize the size of my executable severely (ARM development) and I noticed that in my current build …

c++ c gcc ld strip
C: How to free nodes in the linked list?

How will I free the nodes allocated in another function? struct node { int data; struct node* next; }; struct node* buildList() { …

c linked-list heap-memory
Display the binary representation of a number in C?

Possible Duplicate: Is there a printf converter to print in binary format? Still learning C and I was wondering: Given …

c binary printf representation
Endless loop in C/C++

There are several possibilities to do an endless loop, here are a few I would choose: for(;;) {} while(1) {} / while(true) {} …

c++ c loops infinite-loop
Should I return EXIT_SUCCESS or 0 from main()?

It's a simple question, but I keep seeing conflicting answers: should the main routine of a C++ program return 0 or …

c++ c return-value main
How can I call a function using a function pointer?

Suppose I have these three functions: bool A(); bool B(); bool C(); How do I call one of these functions …

c function-pointers