Search:

Type: Posts; User: cdalten

Page 1 of 8 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    19
    Views
    3,206

    Q, I could be a real dick and say ask your local...

    Q, I could be a real dick and say ask your local college for a refund, but a demo from my computer is enough.

    $emacs -nw sumit.c
    $gcc -Wall sumit.c -o sumit
    sumit.c:4: warning: return type...
  2. Replies
    19
    Views
    3,206

    And how do you propose we handle situations were...

    And how do you propose we handle situations were a person wants to sum up say like:
    12 and 15? Your solution breaks down.
  3. Replies
    19
    Views
    3,206

    I was looking to redeem myself for...

    I was looking to redeem myself for overcomplication the factorial problem on a previous thread.....

    Nah....I won't post another solution.

    Calm down.
  4. Replies
    8
    Views
    1,343

    Hmmm..... I wasn't aware you could do that. You...

    Hmmm..... I wasn't aware you could do that. You win. Pull my finger.
  5. Replies
    8
    Views
    1,343

    Hmm.... my C coding probably blows, but here is...

    Hmm.... my C coding probably blows, but here is what went through my snoodle.



    #include <stdio.h>
    #include <stdlib.h>

    #define BUFF 30

    int main (void) {
  6. Replies
    5
    Views
    2,370

    On some unnamed operating systems, it's not...

    On some unnamed operating systems, it's not possible to malloc() more than 2GB of memory. It has something to do with how the userland and kernelland space is divided up in virtual memory. I think...
  7. And for some reason, the edit post thingy option...

    And for some reason, the edit post thingy option doesn't appear to be working on my account -(.
  8. Creating self- and mutually-referential types

    Here is some more comments on your code.



    typedef struct prod_record {
    int prod_no;
    char prod_name[50];
    float price, stock_on_hand;
    }elementtype;
  9. Replies
    11
    Views
    2,715

    On the link for using strcspn Part 1, I didnt...

    On the link for using strcspn Part 1, I didnt think the following line was legal c code



    printf("line %d:\n", ++k);


    Maybe I mis-understood the concept of a sequence point from the c faq....
  10. Replies
    11
    Views
    1,567

    I don't think it is possible to write a portable...

    I don't think it is possible to write a portable program that lists the hard drive. Say you have a hard drive and a cd-rom. On windows, the hard drive might be listed as the c drive and the cd-rom...
  11. Replies
    5
    Views
    1,792

    When the function permute() calls itself...

    When the function permute() calls itself recursively, it hits permute() first. I guess the thing that is/was throwing me is that rotate() doesn't get execute right after the permute() function. Or at...
  12. Replies
    5
    Views
    1,792

    Question about recursion.

    Given the following program that calculate all the permutations on a string



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

    void rotate(unsigned length, char *string)
    {
  13. Replies
    11
    Views
    1,420

    Should I really start confusing the OP about...

    Should I really start confusing the OP about linux shells now? Technically a shell on linux forms a session. The standard output, input, and error from the shell are connected to either a terminal or...
  14. Thread: <strings.h>

    by cdalten
    Replies
    16
    Views
    12,651

    Doesn't using non-standard headers defeat the...

    Doesn't using non-standard headers defeat the whole purpose of writing portable C code (which made C famous in the first place)?
  15. Thread: Threads on C

    by cdalten
    Replies
    4
    Views
    1,979

    The C programming language doesn't have threads....

    The C programming language doesn't have threads. This is an operating system specific issue. In this case, you might want to consider getting a hold of the book "Advanced Programming in the Unix...
  16. Thread: Keeping pids

    by cdalten
    Replies
    6
    Views
    1,417

    I thought that was only if the 'static' keyword...

    I thought that was only if the 'static' keyword was present.
  17. Replies
    1
    Views
    1,997

    I don't understand the log file -(

    On one end, was my linux box running ssh. On the other end, I was trying to connect to it using my laptop (via a 'borrowed' wireless connection). I just entered my name, not any of the others show in...
  18. Does this mean I might one day become a programmer?

    I recently decided to install scanlogd on linux because of the massive number of portscans I seem to get when I connect to the IRC. Anyhow, I installed the the program right of the suse linux cd. I...
  19. Replies
    7
    Views
    2,069

    I take it you've tried to return a...

    I take it you've tried to return a multidimensional array at one point and time while learning c?
  20. Replies
    4
    Views
    1,164

    I don't understand this security hole.

    Here is the buggy c code



    include <stdio.h>
    #include <stdlib.h>

    #define MAX 8

    int main(void) {
  21. Replies
    6
    Views
    2,441

    Running the code with full warnings produced...

    Running the code with full warnings produced nothing.

    $gcc -Wall str.c -o str
    $./str
    Hello, world!

    Running efence(3) with the default arguments produced the following:

    $gcc -Wall str.c -o...
  22. Replies
    6
    Views
    2,441

    Question about malloc()

    I have a question regarding the following code



    /*I omitted checking malloc() for NULL and didnt use free();
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>

    int main(void) {
  23. Replies
    3
    Views
    1,855

    Yes, memory alignment in C structures still...

    Yes, memory alignment in C structures still matter. There are various (non-portable) ways to ensure the alignment of the variables in memory will be aligned from one machine to the next. Some methods...
  24. Replies
    20
    Views
    3,378

    Dave, Yes, that smells like what the good...

    Dave,

    Yes, that smells like what the good professor was talking about at the time. Okay, since it is starting to become apparent that I make a fool out of myself in front of the smart people,...
  25. Portability is just a passing fad.

    Portability is just a passing fad.
Results 1 to 25 of 200
Page 1 of 8 1 2 3 4