Search:

Type: Posts; User: JTG

Search: Search took 0.01 seconds.

  1. Thread: K&R detab

    by JTG
    Replies
    8
    Views
    2,815

    My initial question wasn't about finding a valid...

    My initial question wasn't about finding a valid solution; it was more about whether my approach in solving the problem looks good enough. I am learning C now and want to be sure i'm forming good...
  2. Replies
    9
    Views
    918

    Oh, i see. Yes i did not know about stdbool.h...

    Oh, i see. Yes i did not know about stdbool.h since it has not been mentioned in K&R (i'm working through but in chapter 1 yet).

    I agree that true/false is more appealing. Right now i have been...
  3. Thread: K&R detab

    by JTG
    Replies
    8
    Views
    2,815

    Both loops are decrementing i. The outer loop,...

    Both loops are decrementing i.

    The outer loop, which is pulling input, decrements i in its declaration statement. There's an if statement inside that resets i to the defined tab length when it...
  4. Replies
    9
    Views
    918

    Why use the while loop, anyway? It seems like you...

    Why use the while loop, anyway? It seems like you just want to take input, test it against certain conditions (M/m or F/f) and then output.

    Also, pardon this question (i'm very new to C) but......
  5. Thread: K&R detab

    by JTG
    Replies
    8
    Views
    2,815

    For testing i made a file called testdata, which...

    For testing i made a file called testdata, which was something like

    1234<tab>123<tab>1
    <tab>123456789<tab>1
    <tab><tab>12345678<tab>1

    Then i ran
    detab < testdata > output

    The two main...
  6. Thread: K&R detab

    by JTG
    Replies
    8
    Views
    2,815

    K&R detab

    Hello all! This is my first thread! I actually signed up to post, because i saw that several people here on the forum have asked about this exercise in the past. Basically, the task is to replace...
Results 1 to 6 of 6