Search:

Type: Posts; User: jabrams

Search: Search took 0.00 seconds.

  1. Thread: Interchange

    by jabrams
    Replies
    1
    Views
    1,112

    int num1 = 10; int num2 = 11; num1 ^= num2;...

    int num1 = 10;
    int num2 = 11;

    num1 ^= num2;
    num2 ^= num1;
    num1 ^= num2;

    num1 = 11 num2 = 10
  2. Replies
    25
    Views
    3,359

    The "learn X in Y days" series of books really...

    The "learn X in Y days" series of books really sucks IMO

    You would be better off getting a "real" book, I recommend
    "A Book On C" by pohl/kelley -- it's great for beginners/intermediate
  3. Replies
    11
    Views
    1,879

    He requires a timeout for connect, this cannot be...

    He requires a timeout for connect, this cannot be done by setting a socket option. I guess you're thinking of SO_RCVTIMEO and SO_SNDTIMEO -- they don't set any kind of timeouts for connect.
  4. Replies
    11
    Views
    1,879

    You could also setup a signal handler for SIGALRM...

    You could also setup a signal handler for SIGALRM using signal(2)

    and then use alarm(2) to send an alarm signal at a specified time.

    This will cause connect() to return with EINTR...
  5. Replies
    4
    Views
    2,571

    int mystrlen(const char *s); int main() { ...

    int mystrlen(const char *s);

    int main() {
    char str[] = "123456789abcdefghijklmnopqrstuvwxyz";

    printf("Length: %d", mystrlen(str));

    return 0;
    }
  6. Replies
    4
    Views
    4,731

    Skipping the first line is easy, fgets(3) will...

    Skipping the first line is easy, fgets(3) will stop reading when encountering a newline, thus your first call to fgets can just discard the data/not write it out to your file.

    Skipping the last...
  7. Replies
    4
    Views
    1,386

    Have you looked at getopt() ? something like:...

    Have you looked at getopt() ?

    something like:




    #include <unistd.h>

    int main(int argc, char **argv) {
  8. Replies
    2
    Views
    1,129

    change to: int CreateFile(char *HotN, char...

    change to:



    int CreateFile(char *HotN, char *Extn) {
    char TmpDt[30], *tmpname;
  9. Replies
    9
    Views
    1,764

    Do you mean something like indent(1) ? Try...

    Do you mean something like indent(1) ?

    Try man indent
Results 1 to 9 of 11