Tech Off Post

Single Post Permalink

View Thread: Best line of code ever
  • User profile image
    PhrostByte

    I've seen people do a good deal of weird stuff, two of my favorites:

    int i; i^=i; // optimization, makes i = 0, but faster.

    char str[32];
    strcpy(str, "foo");
    strcat(str, "\0"); // set null terminator