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 unsigned datatype?

I've seen this unsigned "typeless" type used a couple of times, but never seen an explanation for it. I suppose …

c types unsigned
C sizeof char* array

I have a char* array as follows: char *tbl[] = { "1", "2", "3" }; How do I use the sizeof operator to get the number …

c sizeof
How to printf a memory address in C

My code is: #include <stdio.h> #include <string.h> void main() { char string[10]; int A = -73; …

c pointers printf memory-address unary-operator
Why do I get a warning every time I use malloc?

If I use malloc in my code: int *x = malloc(sizeof(int)); I get this warning from gcc: new.c:7: …

c gcc malloc warnings sizeof
'const int' vs. 'int const' as function parameters in C++ and C

Consider: int testfunc1 (const int a) { return a; } int testfunc2 (int const a) { return a; } Are these two functions the …

c++ c constants
How do I free memory in C?

I'm writing code which has a lot of 1 & 2 dimensional arrays. I got "error: can't allocate region" and I think …

c memory-management malloc
Compile multiple C files with make

(I am running Linux Ubuntu 9.10, so the extension for an executable is executablefile.out) I am just getting into modular …

c makefile compilation modular
How to use the addr2line command in Linux?

I am trying to use addr2line command in Unix but everytime it is giving the same output as ??:0. I …

c linux valgrind addr2line
Multi-character constant warnings

Why is this a warning? I think there are many cases when is more clear to use multi-char int constants …

c++ c casting compiler-warnings portability
How to play MP3 files in C?

I'm looking for the easiest way to play a MP3 file in C. I am looking for either a library, …

c mp3