online C programming test

Discussion in 'C Programming' started by E. Robert Tisdale, Feb 3, 2004.

  1. Does anyone know where I can find a good online C programming test?
    I used Google to search for

    "C programming test"

    and found lots of stuff but the first several pages were disappointing.
     
    E. Robert Tisdale, Feb 3, 2004
    #1
    1. Advertising

  2. [ERT] Re: online C programming test

    On Mon, 2 Feb 2004, E. Robert Tisdale wrote:
    >
    > Does anyone know where I can find a good online C programming test?


    ________________
    /| /| | | |
    ||__|| | | REMEMBER NOT |
    / O O\__ | TO FEED THE |
    / \ | TROLLS |
    / \ \|________________|
    / _ \ \ ||
    / |\____\ \ ||
    / | | | |\____/ ||
    / \|_|_|/ | _||
    / / \ |____| ||
    / | | | --|
    | | | |____ --|
    * _ | |_|_|_| | \-/
    *-- _--\ _ \ | ||
    / _ \\ | / `
    * / \_ /- | | |
    * ___ c_c_c_C/ \C_c_c_c____________
     
    Arthur J. O'Dwyer, Feb 3, 2004
    #2
    1. Advertising

  3. Re: [ERT] Re: online C programming test

    "Arthur J. O'Dwyer" <> wrote in message
    news:p...
    >
    > On Mon, 2 Feb 2004, E. Robert Tisdale wrote:
    > >
    > > Does anyone know where I can find a good online C programming test?

    >
    > ________________
    > /| /| | | |
    > ||__|| | | REMEMBER NOT |
    > / O O\__ | TO FEED THE |
    > / \ | TROLLS |
    > / \ \|________________|
    > / _ \ \ ||
    > / |\____\ \ ||
    > / | | | |\____/ ||
    > / \|_|_|/ | _||
    > / / \ |____| ||
    > / | | | --|
    > | | | |____ --|
    > * _ | |_|_|_| | \-/
    > *-- _--\ _ \ | ||
    > / _ \\ | / `
    > * / \_ /- | | |
    > * ___ c_c_c_C/ \C_c_c_c____________



    Ha-ha-ha!
     
    Vijay Kumar R Zanvar, Feb 3, 2004
    #3
  4. Re: [ERT] Re: online C programming test

    "Vijay Kumar R Zanvar" <> wrote in message
    news:bvntum$tku5d$-berlin.de...
    >
    > "Arthur J. O'Dwyer" <> wrote in message
    > news:p...
    > >
    > > On Mon, 2 Feb 2004, E. Robert Tisdale wrote:
    > > >
    > > > Does anyone know where I can find a good online C programming test?

    > >
    > > ________________
    > > /| /| | | |
    > > ||__|| | | REMEMBER NOT |
    > > / O O\__ | TO FEED THE |
    > > / \ | TROLLS |
    > > / \ \|________________|
    > > / _ \ \ ||
    > > / |\____\ \ ||
    > > / | | | |\____/ ||
    > > / \|_|_|/ | _||
    > > / / \ |____| ||
    > > / | | | --|
    > > | | | |____ --|
    > > * _ | |_|_|_| | \-/
    > > *-- _--\ _ \ | ||
    > > / _ \\ | / `
    > > * / \_ /- | | |
    > > * ___ c_c_c_C/ \C_c_c_c____________

    >
    >
    > Ha-ha-ha!
    >

    Forgot to add. I think by [ERT], in the subject line, you mean [OT].
     
    Vijay Kumar R Zanvar, Feb 3, 2004
    #4
  5. Re: [ERT] Re: online C programming test

    Vijay Kumar R Zanvar <> scribbled the following:
    > "Vijay Kumar R Zanvar" <> wrote in message
    > news:bvntum$tku5d$-berlin.de...
    >> "Arthur J. O'Dwyer" <> wrote in message
    >> news:p...
    >> > On Mon, 2 Feb 2004, E. Robert Tisdale wrote:
    >> > > Does anyone know where I can find a good online C programming test?
    >> >
    >> > ________________
    >> > /| /| | | |
    >> > ||__|| | | REMEMBER NOT |
    >> > / O O\__ | TO FEED THE |
    >> > / \ | TROLLS |
    >> > / \ \|________________|
    >> > / _ \ \ ||
    >> > / |\____\ \ ||
    >> > / | | | |\____/ ||
    >> > / \|_|_|/ | _||
    >> > / / \ |____| ||
    >> > / | | | --|
    >> > | | | |____ --|
    >> > * _ | |_|_|_| | \-/
    >> > *-- _--\ _ \ | ||
    >> > / _ \\ | / `
    >> > * / \_ /- | | |
    >> > * ___ c_c_c_C/ \C_c_c_c____________

    >>
    >>
    >> Ha-ha-ha!
    >>

    > Forgot to add. I think by [ERT], in the subject line, you mean [OT].


    I thought he meant E. Robert Tisdale. You know, ERT.

    --
    /-- Joona Palaste () ------------- Finland --------\
    \-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
    "I said 'play as you've never played before', not 'play as IF you've never
    played before'!"
    - Andy Capp
     
    Joona I Palaste, Feb 3, 2004
    #5
  6. E. Robert Tisdale

    CBFalconer Guest

    Re: [ERT] Re: online C programming test

    Vijay Kumar R Zanvar wrote:
    >

    .... snip ...
    > >

    > Forgot to add. I think by [ERT], in the subject line, you mean [OT].


    No he doesn't. You obviously have not done the requisite lurking
    before posting.

    --
    Chuck F () ()
    Available for consulting/temporary embedded and systems.
    <http://cbfalconer.home.att.net> USE worldnet address!
     
    CBFalconer, Feb 3, 2004
    #6
  7. Re: [ERT] Re: online C programming test

    "CBFalconer" <> wrote in message
    news:...
    > Vijay Kumar R Zanvar wrote:
    > >

    > ... snip ...
    > > >

    > > Forgot to add. I think by [ERT], in the subject line, you mean [OT].

    >
    > No he doesn't. You obviously have not done the requisite lurking
    > before posting.


    No wonder they say satire is dead... <g>

    --
    Peter
     
    Peter Nilsson, Feb 3, 2004
    #7
  8. E. Robert Tisdale

    Mike Wahler Guest

    "E. Robert Tisdale" <> wrote in message
    news:...
    > Does anyone know where I can find a good online C programming test?


    The best one I'm aware of is this newsgroup. The test questions
    are those of other posters. If I post code with errors, it gets
    quickly torn to shreds -- which is a Good Thing(tm).

    The additional benefit is that there are folks here willing to
    *explain* what's wrong with poor or broken code.

    -Mike
     
    Mike Wahler, Feb 3, 2004
    #8
  9. Mike Wahler wrote:

    >
    > "E. Robert Tisdale" <> wrote in message
    > news:...
    >> Does anyone know where I can find a good online C programming test?

    >
    > The best one I'm aware of is this newsgroup. The test questions
    > are those of other posters.


    Mr Tisdale has, of course, already taken that test many times, and failed it
    many times.

    <snip>

    --
    Richard Heathfield :
    "Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
    C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
    K&R answers, C books, etc: http://users.powernet.co.uk/eton
     
    Richard Heathfield, Feb 3, 2004
    #9
  10. Mike Wahler wrote:

    > E. Robert Tisdale wrote:
    >
    >>Does anyone know where I can find a good online C programming test?

    >
    > The best one I'm aware of is this newsgroup.
    > The test questions are those of other posters.
    > If I post code with errors, it gets quickly torn to shreds --
    > which is a Good Thing(tm).
    >
    > The additional benefit is that there are folks here
    > willing to *explain* what's wrong with poor or broken code.


    I agree.
    But it would be helpful if someone had collect these examples
    into a handy compendium.
     
    E. Robert Tisdale, Feb 3, 2004
    #10
  11. Richard Heathfield wrote:

    > Mike Wahler wrote:
    >
    >>E. Robert Tisdale wrote:
    >>
    >>>Does anyone know where I can find a good online C programming test?

    >>
    >>The best one I'm aware of is this newsgroup.
    >>The test questions are those of other posters.

    >
    > Mr. Tisdale has, of course, already taken that test many times
    > and failed it many times.


    You can find examples of my C code at

    http://www.netwood.net/~edwin/svmtl/

    Just click on

    The ANSI C Numerical Class Library

    Please remind me where I can find examples of your C programs.
     
    E. Robert Tisdale, Feb 3, 2004
    #11
  12. E. Robert Tisdale wrote:

    > Richard Heathfield wrote:
    >
    >> Mike Wahler wrote:
    >>
    >>>E. Robert Tisdale wrote:
    >>>
    >>>>Does anyone know where I can find a good online C programming test?
    >>>
    >>>The best one I'm aware of is this newsgroup.
    >>>The test questions are those of other posters.

    >>
    >> Mr. Tisdale has, of course, already taken that test many times
    >> and failed it many times.

    >
    > You can find examples of my C code at
    >
    > http://www.netwood.net/~edwin/svmtl/
    >
    > Just click on
    >
    > The ANSI C Numerical Class Library


    I had a quick look. Approximately 6000 lines of code in various .c and .h
    files. (3200 when blank lines and comments are removed.)

    Most of it wouldn't compile under a conforming C90 implementation, because
    of heavy use of the inline keyword, which doesn't exist in C90.

    I didn't spend very long reading the code, because I found it to be almost
    unreadable. Here's a quick extract, taken entirely at random:

    ncl_dcsubmatrix* /* M -= N */
    (ncl_dcsubm_msub)(ncl_dcsubmatrix* pM, const ncl_dcsubmatrix* pN) {
    ncl_extent mM = ncl_dcsubm_extent2(pM);
    ncl_offset i = 0;
    #ifdef NCL_ERRANT
    ncl_extent mN = ncl_dcsubm_extent2(pN);
    if (mM != mN) {
    ncl_message("In function ncl_dcsubm_msub(ncl_dcsubmatrix*,\n"
    " const ncl_dcsubmatrix*): submatrix differ in second extent.\n");
    mM = (mM < mN)? mM: mN;
    }
    #endif /* NCL_ERRANT */
    for (i = 0; i < mM; ++i) {
    ncl_dcsubvector v = ncl_dcsubm_subv2(pM, i);
    ncl_dcsubvector u = ncl_dcsubm_subv2(pN, i);
    ncl_dcsubv_vsub(&v, &u);
    ncl_dcsubv_destroy(&u);
    ncl_dcsubv_destroy(&v);
    }
    return pM; }



    Frankly, I find that unreadable.



    > Please remind me where I can find examples of your C programs.


    In the literature.

    --
    Richard Heathfield :
    "Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
    C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
    K&R answers, C books, etc: http://users.powernet.co.uk/eton
     
    Richard Heathfield, Feb 3, 2004
    #12
  13. In article <>,
    "E. Robert Tisdale" <> wrote:

    > Richard Heathfield wrote:
    >
    > > Mike Wahler wrote:
    > >
    > >>E. Robert Tisdale wrote:
    > >>
    > >>>Does anyone know where I can find a good online C programming test?
    > >>
    > >>The best one I'm aware of is this newsgroup.
    > >>The test questions are those of other posters.

    > >
    > > Mr. Tisdale has, of course, already taken that test many times
    > > and failed it many times.

    >
    > You can find examples of my C code at
    >
    > http://www.netwood.net/~edwin/svmtl/
    >
    > Just click on
    >
    > The ANSI C Numerical Class Library
    >
    > Please remind me where I can find examples of your C programs.


    I am impressed.

    That anyone would write that kind of code and willingly publish it where
    everyone can see it...
     
    Christian Bau, Feb 3, 2004
    #13
  14. Christian Bau wrote:

    > I am impressed.
    >
    > That anyone would write that kind of code
    > and willingly publish it where everyone can see it...


    And exactly where can we download this code that *you* are so proud of?
     
    E. Robert Tisdale, Feb 3, 2004
    #14
  15. E. Robert Tisdale

    MSG Guest

    Richard Heathfield <> wrote in message news:<bvot7s$fbb$>...
    > Mike Wahler wrote:
    >
    > >
    > > "E. Robert Tisdale" <> wrote in message
    > > news:...
    > >> Does anyone know where I can find a good online C programming test?

    > >
    > > The best one I'm aware of is this newsgroup. The test questions
    > > are those of other posters.

    >
    > Mr Tisdale has, of course, already taken that test many times, and failed it
    > many times.


    Yes, but others failed it many times as well, sometimes thanks to him,
    e.g. when many C people stated that you could not return structs from
    functions. I don't want to google, but it went something like this

    struct foo f() {
    struct foo s;
    s.x = x;
    s.y = y;
    s.z = z;

    return s;
    }

    *Many* (but not ERT) said you could not do this in C. So let's be fair
    here.

    MSG
     
    MSG, Feb 3, 2004
    #15
  16. "Richard Heathfield" <> wrote in message
    news:bvp54p$dvm$...
    >
    > I didn't spend very long reading the code, because I found it to be almost
    > unreadable. Here's a quick extract, taken entirely at random:
    >
    > ncl_dcsubmatrix* /* M -= N */
    > (ncl_dcsubm_msub)(ncl_dcsubmatrix* pM, const ncl_dcsubmatrix* pN) {
    > ncl_extent mM = ncl_dcsubm_extent2(pM);
    > ncl_offset i = 0;
    > #ifdef NCL_ERRANT
    > ncl_extent mN = ncl_dcsubm_extent2(pN);
    > if (mM != mN) {
    > ncl_message("In function ncl_dcsubm_msub(ncl_dcsubmatrix*,\n"
    > " const ncl_dcsubmatrix*): submatrix differ in second extent.\n");
    > mM = (mM < mN)? mM: mN;
    > }
    > #endif /* NCL_ERRANT */
    > for (i = 0; i < mM; ++i) {
    > ncl_dcsubvector v = ncl_dcsubm_subv2(pM, i);
    > ncl_dcsubvector u = ncl_dcsubm_subv2(pN, i);
    > ncl_dcsubv_vsub(&v, &u);
    > ncl_dcsubv_destroy(&u);
    > ncl_dcsubv_destroy(&v);
    > }
    > return pM; }
    >
    > Frankly, I find that unreadable.


    Not wanting to defend Mr ERT, I must regretfully say that most GPL code I
    have seen looks worse. Moreover it is usually highly non-portable. Is there
    a clause in GPL that I missed that says that the source must be unreadable?

    Peter
     
    Peter Pichler, Feb 3, 2004
    #16
  17. MSG wrote:

    > Richard Heathfield <> wrote in message
    > news:<bvot7s$fbb$>...
    >> Mike Wahler wrote:
    >>
    >> >
    >> > "E. Robert Tisdale" <> wrote in message
    >> > news:...
    >> >> Does anyone know where I can find a good online C programming test?
    >> >
    >> > The best one I'm aware of is this newsgroup. The test questions
    >> > are those of other posters.

    >>
    >> Mr Tisdale has, of course, already taken that test many times, and failed
    >> it many times.

    >
    > Yes, but others failed it many times as well, sometimes thanks to him,
    > e.g. when many C people stated that you could not return structs from
    > functions.


    Er, that's bizarre. Of course you can. The Standard even gives an example of
    (a pointer to) a function that returns a struct.

    Not saying it's a great idea, mind - but you can certainly do it.

    > I don't want to google, but it went something like this
    >
    > struct foo f() {
    > struct foo s;
    > s.x = x;
    > s.y = y;
    > s.z = z;
    >
    > return s;
    > }
    >
    > *Many* (but not ERT) said you could not do this in C.


    Do you have a thread reference for that? A message ID or something?

    > So let's be fair here.


    I wasn't aware that I was being unfair. Anyone who says you can't return
    structs from functions in C deserves a (metaphorical) slap on the wrist.
    That doesn't change what I said about Tisdale, of course.

    --
    Richard Heathfield :
    "Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
    C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
    K&R answers, C books, etc: http://users.powernet.co.uk/eton
     
    Richard Heathfield, Feb 3, 2004
    #17
  18. Peter Pichler wrote:

    <snip>

    > I must regretfully say that most GPL code I
    > have seen looks worse. Moreover it is usually highly non-portable. Is
    > there a clause in GPL that I missed that says that the source must be
    > unreadable?


    No, but there does seem to be some kind of underlying ethos of "I'm doing
    this for free, so I don't have to be legible", which I find appalling. I go
    to a lot of trouble to make my own code readable. Whether I succeed is for
    others to judge for themselves, but at least I try. I wish this were more
    common.

    --
    Richard Heathfield :
    "Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
    C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
    K&R answers, C books, etc: http://users.powernet.co.uk/eton
     
    Richard Heathfield, Feb 3, 2004
    #18
  19. E. Robert Tisdale

    Default User Guest

    MSG wrote:

    > struct foo f() {
    > struct foo s;
    > s.x = x;
    > s.y = y;
    > s.z = z;
    >
    > return s;
    > }
    >
    > *Many* (but not ERT) said you could not do this in C. So let's be fair
    > here.


    I don't believe you when you say "many said you could not do this in C."
    I'd like to see you back that up.

    Yes,it is true that Trollsdale is not a complete idiot, which makes him
    dangerous. He can talk a good game, enough to suck the newbies in.



    Brian Rodenborn
     
    Default User, Feb 4, 2004
    #19
  20. "MSG" <> wrote:
    >
    > Yes, but others failed it many times as well, sometimes thanks to him

    [ERT],
    > e.g. when many C people stated that you could not return structs from
    > functions. I don't want to google, but it went something like this
    >
    > struct foo f() {
    > struct foo s;
    > s.x = x;
    > s.y = y;
    > s.z = z;
    >
    > return s;
    > }
    >
    > *Many* (but not ERT) said you could not do this in C. So let's be fair
    > here.


    OK, let's be fair. The code above *is* in fact illegal ;-)
     
    Peter Pichler, Feb 4, 2004
    #20
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    9
    Views:
    1,406
    Puppet_Sock
    Jan 4, 2008
  2. Replies:
    15
    Views:
    1,556
    Richard Heathfield
    Mar 14, 2008
  3. pmp
    Replies:
    1
    Views:
    7,021
    .rhavin grobert
    Oct 24, 2008
  4. Skybuck Flying

    Call oddities: &Test() vs &Test vs Test

    Skybuck Flying, Oct 4, 2009, in forum: C Programming
    Replies:
    1
    Views:
    726
    Skybuck Flying
    Oct 4, 2009
  5. pmp
    Replies:
    7
    Views:
    2,664
    Phil Carmody
    Oct 28, 2009
Loading...

Share This Page