Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Loonix halp

Name: Anonymous 2008-01-22 18:24

How would I make my program check if it was root?

Name: Anonymous 2008-01-22 20:49

>>13
Wrong.

#include <stdio.h>
#include <string.h>

int main(int argc, char **argv) {
  printf("I am%s root.\n", strcmp(*argv, "root") ? " not" : "");
  return 0;
}

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List