Skip to content

Instantly share code, notes, and snippets.

@jakebloom
Created May 14, 2015 01:25
Show Gist options
  • Save jakebloom/691138a0251a8580eb14 to your computer and use it in GitHub Desktop.
Save jakebloom/691138a0251a8580eb14 to your computer and use it in GitHub Desktop.
common C errors
#include <stdio.h>
#include <stdlib.h>
#define TRUE 1
#define FALSE 0
int main (int argc, char *argv[]){
int result = function();
if (result == TRUE){
//Something here
}
if (result == FALSE){
//something else
}
char message[10];
int i;
message[i] = 'A';
i = 1;
while (i <= 10){
message[i] = "0";
}
return EXIT_SUCCESS
}
@jakebloom
Copy link
Author

I count about 9 errors here - see if you can catch them all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment