Skip to content

Instantly share code, notes, and snippets.

@hidsh
Created January 10, 2012 02:16
Show Gist options
  • Save hidsh/1586441 to your computer and use it in GitHub Desktop.
Save hidsh/1586441 to your computer and use it in GitHub Desktop.
return result code
#include <stdio.h>
#include <stdlib.h> /* atoi */
int main(int argc, char *argv[])
{
int ret = -1;
if(argc>1) {
ret = atoi(argv[1]);
printf("%d\n", ret);
}
return ret;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment