Skip to content

Instantly share code, notes, and snippets.

@fclairamb
Created September 3, 2013 16:55
Show Gist options
  • Save fclairamb/6426534 to your computer and use it in GitHub Desktop.
Save fclairamb/6426534 to your computer and use it in GitHub Desktop.
valgrind demo
#ifdef SHELL
gcc $0 -g -Wall -Werror && valgrind -q ./a.out
exit 0
#endif
#include <stdio.h>
int main( int argc, char * argv [] ) {
int i;
for(; i < 10; i++ ) {
printf("i = %d\n", i );
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment