Top "C" questions

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

What is the difference between char * const and const char *?

What's the difference between: char * const and const char *

c pointers constants
Launch Failed. Binary not found. CDT on Eclipse Helios

I'm using Eclipse Helios on Ubuntu 10.04, and I'm trying to install CDT plugin on it. I download it from here …

c++ c eclipse eclipse-plugin eclipse-cdt
error: unknown type name ‘bool’

I downloaded the source code and wanted to compile the file of scanner. It produces this error: [meepo@localhost cs143…

c gcc lex
How to correctly assign a new string value?

I'm trying to understand how to solve this trivial problem in C, in the cleanest/safest way. Here's my example: #…

c string struct strcpy
Undefined reference to `pow' and `floor'

I'm trying to make a simple fibonacci calculator in C but when compiling gcc tells me that I'm missing the …

c gcc undefined-reference
Timer function to provide time in nano seconds using C++

I wish to calculate the time it took for an API to return a value. The time taken for such …

c++ c timer
How to achieve function overloading in C?

Is there any way to achieve function overloading in C? I am looking at simple functions to be overloaded like …

c overloading
Determine the line of code that causes a segmentation fault?

How does one determine where the mistake is in the code that causes a segmentation fault? Can my compiler (gcc) …

c++ c debugging segmentation-fault
C Programming: How to read the whole file contents into a buffer

I want to write the full contents of a file into a buffer. The file actually only contains a string …

c file-io
Algorithm: efficient way to remove duplicate integers from an array

I got this problem from an interview with Microsoft. Given an array of random integers, write an algorithm in C …

c algorithm arrays duplicates