is C useful ?

Discussion in 'C Programming' started by zc, Jan 7, 2004.

  1. zc

    zc Guest

    I have just decided to learn C,
    But is it useful ? or should I learn C++ ?
    Can I get a job with C ?
    what can I do with C ?
    zc
     
    zc, Jan 7, 2004
    #1
    1. Advertisements

  2. Can't hurt.
    Anything you can imagine. Some things are harder in C than in C++ but it's
    yet to be a real problem for me. You will find more C compilers available
    for 8-bit microcontrollers than C++ compilers.
     
    Mark A. Odell, Jan 7, 2004
    #2
    1. Advertisements

  3. zc

    Eric Guest

    Really? I can travel back and forth in time? :)
     
    Eric, Jan 7, 2004
    #3
  4. (Eric) wrote in

    Okay, well anything you can image that could be programmed into a CPU with
    C run-time support and a compiler. I should have been more specific. If
    you do go back in time, could you get rid of plain char?
     
    Mark A. Odell, Jan 7, 2004
    #4
  5. No, it's a complete waste of time.
    No, it's a complete waste of time.
    No, there are no jobs. Of any sort. Doing anything.
    Nothing. You are a wart on the ass of the universe. Give up.
     
    Martin Ambuhl, Jan 7, 2004
    #5
  6. Yes.
     
    E. Robert Tisdale, Jan 7, 2004
    #6
  7. zc

    Les Cargill Guest

    Shhhh!
     
    Les Cargill, Jan 7, 2004
    #7
  8. zc

    Eric Sosman Guest

    Certainly. For example:

    #include <stdio.h>
    int main(void) {
    int i = 0 //*comment*/
    + 10;
    printf ("The year is %d\n", 1989 + i);
    return 0;
    }
     
    Eric Sosman, Jan 7, 2004
    #8
  9. zc

    Sidney Cadot Guest

    You said that the next time this will come up.

    Regards,
    Sidney
     
    Sidney Cadot, Jan 7, 2004
    #9
  10. zc

    Sidney Cadot Guest

    Determining whether a given file exists seems to be a bit of a stretch
    though.

    Best regards,

    Sidney
     
    Sidney Cadot, Jan 7, 2004
    #10
  11. zc

    Aggro Guest

    See <time.h>

    You might need to use some extensions of C.
     
    Aggro, Jan 7, 2004
    #11
  12. Yes, you can use C to interface to the mind warper generation 4
    Dimensional Warp Generator # 52 4350a series wrist watch with z60
    or better memory adapter.

    The specifics is left as an exercise to the reader.

    --

    +---------+----------------------------------+-----------------------------+
    | Kenneth | kenbrody at spamcop.net | "The opinions expressed |
    | J. | http://www.hvcomputer.com | herein are not necessarily |
    | Brody | http://www.fptech.com | those of fP Technologies." |
    +---------+----------------------------------+-----------------------------+
     
    Kenneth Brody, Jan 8, 2004
    #12
  13. Just open("/dev/time",O_RDONLY), and then lseek() as necessary.

    --

    +---------+----------------------------------+-----------------------------+
    | Kenneth | kenbrody at spamcop.net | "The opinions expressed |
    | J. | http://www.hvcomputer.com | herein are not necessarily |
    | Brody | http://www.fptech.com | those of fP Technologies." |
    +---------+----------------------------------+-----------------------------+
     
    Kenneth Brody, Jan 8, 2004
    #13
  14. zc

    Fao, Sean Guest

    Programs are only as smart is their designer(s) makes them. If you can
    program a time machine in C, then the answer to this question is, "yes"
    ;-).

    Sean
     
    Fao, Sean, Jan 8, 2004
    #14
  15. zc

    I.M.A Troll Guest

    But only if you don't cast malloc(). Sorry E. I know we trolls
    should stick together. What does E. stand for anyway? It must be
    awful!
     
    I.M.A Troll, Jan 9, 2004
    #15
  16. zc

    Morris Dovey Guest

    This is really three questions. Forth is off-topic in comp.lang.c
    so you'll have to ask about that in another newsgroup.

    "Anything you can imagine" is implementation dependent, as Mark
    should have pointed out. This is also best addressed in a
    different forum - perhaps alt.bin.[whatever]

    Reality and time within the same context would seem to have been
    "icky" to the authors of the ISO standard. They seem to have been
    obliged to admit that time exists; but could not bring themselves
    to actually give it a size, shape, or even a domain. It's not
    even guaranteed to be monotonic.

    The upshot is that you /may/ be able to go back in time; but
    if/when you get there, you can't verify success by direct
    examination of that /when/.

    Even the common extensions do not provide much satisfaction. The
    entire subject seems to have been stricken with geek poisoning.
    In POSIX land, for example, you can go back to the beginning of
    1970, but any attempt to go earlier will result in falling off
    the edge of the continuum. An attempt to go back to, say, the
    fall of Carthage will be met with jeers and ridicule by even the
    friendliest of mktime() implementations.

    To remain strictly conforming, it's safest to stay when you are.
     
    Morris Dovey, Jan 9, 2004
    #16
  17. Morris Dovey wrote:
    [...]
    [...]

    "Monotonous", on the other hand...

    --

    +---------+----------------------------------+-----------------------------+
    | Kenneth | kenbrody at spamcop.net | "The opinions expressed |
    | J. | http://www.hvcomputer.com | herein are not necessarily |
    | Brody | http://www.fptech.com | those of fP Technologies." |
    +---------+----------------------------------+-----------------------------+
     
    Kenneth Brody, Jan 9, 2004
    #17
  18. zc

    David Shaw Guest

    It's always important to take care and open /dev/time O_RDONLY. It
    helps prevent the sadly common "kill your own grandparents" bug.

    David
     
    David Shaw, Jan 9, 2004
    #18
  19. zc

    Eric Guest

    Yes, indeed.

    Someone should really speak to the system administrator about this.
     
    Eric, Jan 9, 2004
    #19
  20. zc

    CBFalconer Guest

    Unfortunately open, lseek, and grandparents are not mentioned in
    the standard, and are thus OT here. Time travel is intrinsically
    not portable. Please move to a future newsgroup which covers your
    system. :)
     
    CBFalconer, Jan 10, 2004
    #20
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.