Useful tools for C programmers

C file browsing


CScope prints out the global symbols in C programs and helps to navigate around files.


Cxref - C Cross Referencing & Documenting tool is a program that will produce documentation (in LaTeX, HTML, RTF or SGML) including cross-references from C program source code. It has been designed to work with ANSI C, incorporating K&R, and most popular GNU extensions.

Memory errors


Valgrind detects memory errors such as leaks (failing to free memory), use of uninitialized memory areas, or writing to unallocated areas of memory in C programs. It runs on Linux and FreeBSD.


Indent can reindent the lines of source code in C programs according to various standards.

Exuberant ctags

Exuberent ctags, distributed with Emacs, helps find the definition of functions and symbols.

etags *.c *.h

Find common programming errors

lint is a program available on Unix systems which finds programming errors.

Create header (.h) files from C


CFunctions makes header files (.h files) from C files.

cfunctions -in *.c


Makeheaders makes header files (.h files) from C files.


Makedepend makes a list of dependencies for a Makefile from your C source code.

makedepend -Y *.c *.h


Cdecl helps to unravel complicated C declarations.

Pastebins lets you test short C programs on the web, without a compiler.

Ideone lets you test short C programs on the web, without a compiler.

Remove preprocessor conditionals

unifdef is a program to remove preprocessor #ifdef statements from a C source file. See also unifdef - selectively remove C preprocessor conditionals.

Web links

Copyright © Ben Bullock 2009-2021. All rights reserved. For comments, questions, and corrections, please email Ben Bullock ( or use the discussion group at Google Groups. News about the site. / Privacy / Disclaimer