I just got back from an exam...

This is a discussion on I just got back from an exam... within the A Brief History of Cprogramming.com forums, part of the Community Boards category; A C++ programming exam is probably no place for a subjective question....

  1. #16
    Jack of many languages Dino's Avatar
    Join Date
    Nov 2007
    Location
    Katy, Texas
    Posts
    2,309
    A C++ programming exam is probably no place for a subjective question.
    Mac and Windows cross platform programmer. Ruby lover.

    Quote of the Day
    12/20: Mario F.:I never was, am not, and never will be, one to shut up in the face of something I think is fundamentally wrong.

    Amen brother!

  2. #17
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,475
    I don't know. Don't find it that subjective. But one can also argue you find subjectivity in many aspects of C++ programming. So...

    In any case, these type of questions do make sense to me. Particularly on a basic level such as the one this exam clearly aims at. And the answer is usually an easy exercise of simply excluding the wrong possibilities and finding the encompassing one in case more than one option is right:

    Code:
    D = A AND B.
    Since A and B are right answers, D is the only possible answer.
    Ignoring either A or B is an error.
    
    EDIT: Remember, the question makes no assumptions as to either A or B. So we must assume both are valid.
    I'm sure some of you will help me with the logic rule name that validates my claim. But regarding the professor, laserlight might be right. Out of simple curiosity though, keep us posted citizen.
    Last edited by Mario F.; 11-21-2008 at 07:24 AM.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  3. #18
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Location
    Ireland
    Posts
    2,262
    >> I'm not sure how, citizen.
    The problem is that you're a reasonable person, Mario, who doesn't have anything riding on the test.

    People who when they think they know a lot about something and are contradicted with proof on their speciality tend to become defensive, and from my experience, curl up into a ball, ignore the problem and hope the complainer dies or leave the matter rest. However, if one as determined and wronged as I were to not let it go one would be informed of a curious phenomenon computer error which cause your score (and only your score) to be in error, your score is remedied and hey presto, your score wasn't changed until the second visit to the grader...

  4. #19
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,709
    I was going to wait until there was some sort of announcement before I posted, but my professor wrote me back. She agreed that my answers were marked wrong and corrected my score. She said she would double check to see what the cause of the problem is, so unfortunately I don't know the cause yet. She thanked me.

    Considering I was likely the first to take the midterm, she may have simply corrected the master answer key so that no one else has the same problems and won't announce it. I'm thinking that this is a simple mistake as the lecture material never taught such silly answers.

    Also, with those points back, I now have an A. Worth it indeed.

  5. #20
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Location
    Ireland
    Posts
    2,262
    Clearly your professors aren't nearly as cynical as some of mine. Lucky man!

  6. #21
    Jack of many languages Dino's Avatar
    Join Date
    Nov 2007
    Location
    Katy, Texas
    Posts
    2,309
    Quote Originally Posted by citizen View Post
    Also, with those points back, I now have an A. Worth it indeed.
    Woo-HOO!!!
    Mac and Windows cross platform programmer. Ruby lover.

    Quote of the Day
    12/20: Mario F.:I never was, am not, and never will be, one to shut up in the face of something I think is fundamentally wrong.

    Amen brother!

  7. #22
    Hail to the king, baby. Akkernight's Avatar
    Join Date
    Oct 2008
    Location
    Faroe Islands
    Posts
    717
    Congratz with the A
    But that first question thing is so simple that even I can do it o.O ... How can someone possible do that wrong?
    Currently research OpenGL

  8. #23
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,475
    Quote Originally Posted by Akkernight View Post
    But that first question thing is so simple that even I can do it o.O ... How can someone possible do that wrong?
    There's so many things that can go wrong with that question.
    For one, as citizen made a point to signal, cin isn't defined. Naturally we assume std::cin, but it could be a user-defined type or a native type. Even if a user-defined stream or a native type, there's no guarantee the << operator hasn't been overloaded and what it does.

    But, even if std::cin, we could add a twist and mention the possibility of a macro validating both forms, or the possible presence of another << overload.

    Of course the answer can only be one, giving the question.
    But when arguing with your professor, you better cover all the basis.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  9. #24
    Registered User
    Join Date
    Aug 2002
    Location
    Hermosa Beach, CA
    Posts
    446
    If I was your professor I wouldn't have given you points back on the first one. You assumed that cin was the same as std::cin, but it does not have to be, and if it wasn't there is nothing that says it *can't* compile:

    Code:
    class mycin {
      public:
      int val;
      void operator>>(int v) { val = v; }
    } cin;
    
    void operator>>(int v, mycin& c) { c.val = v; }
    
    int main ()
    {
      cin >> 5;
      5 >> cin;
    
      return 0;
    }
    maybe i'm a ... donkey ... but I can respect the fact that he wrote a good trick question.
    The crows maintain that a single crow could destroy the heavens. Doubtless this is so. But it proves nothing against the heavens, for the heavens signify simply: the impossibility of crows.

  10. #25
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,709
    >> You assumed that cin was the same as std::cin

    It was correct to do so given how the question was actually written on the exam. I made an earlier post quoting the email I sent my professor: those questions were directly copied from the exam.

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C programming exercises, exam notes, questions...etc
    By BlackOps in forum C Programming
    Replies: 0
    Last Post: 07-11-2009, 08:54 AM
  2. new problem with class
    By jrb47 in forum C++ Programming
    Replies: 0
    Last Post: 12-01-2006, 07:39 AM
  3. UInt to CString and back
    By xlnk in forum Windows Programming
    Replies: 6
    Last Post: 08-27-2003, 03:08 PM
  4. Some woman back ended my car today, and back hurts
    By Terrance in forum A Brief History of Cprogramming.com
    Replies: 19
    Last Post: 08-20-2003, 12:42 AM
  5. I am back
    By NANO in forum C++ Programming
    Replies: 0
    Last Post: 06-24-2002, 11:00 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21