Skip to content

Instantly share code, notes, and snippets.

@infosec-intern
Last active February 1, 2017 04:36
Show Gist options
  • Save infosec-intern/76cd687ce3ca831e423a35217e70d61a to your computer and use it in GitHub Desktop.
Save infosec-intern/76cd687ce3ca831e423a35217e70d61a to your computer and use it in GitHub Desktop.
Integrate if statements like the following directly in the for loop conditional
for(i = 0; i < GLOB_MAX && globs[i][0] != '\0'; i++) {
// if (globs[i][0] == '\0') {
// continue;
// }
printf("Glob[%d] = %s\n", i, globs[i]);
}
@infosec-intern
Copy link
Author

A comma between conditional statements acts like a semicolon usually would
A || acts like a logical OR statement
A && acts like a logical AND statement

I placed && there because I need both conditions to be true to get the for loop to run

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