Created
May 14, 2015 01:25
-
-
Save jakebloom/691138a0251a8580eb14 to your computer and use it in GitHub Desktop.
common C errors
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I count about 9 errors here - see if you can catch them all