Exam question help

This is a discussion on Exam question help within the C Programming forums, part of the General Programming Boards category; Originally Posted by Overworked_PhD I guess I tend to believe Dr. Sosman over you. Maybe this is because the guy ...

  1. #31
    Registered User claudiu's Avatar
    Join Date
    Feb 2010
    Location
    London, United Kingdom
    Posts
    2,094
    Quote Originally Posted by Overworked_PhD View Post
    I guess I tend to believe Dr. Sosman over you. Maybe this is because the guy used to be a former Mathematics Professor before joining SUN as a Senior Engineer. Maybe it's because he holds a Ph.D. Or maybe it's because he has several academic publications.
    Or maybe you misquoted him because there is no way in hell he is that uneducated. On the other hand, if you just typed in here what you understood from what he actually told you, then everything makes sense.
    1. Get rid of gets(). Never ever ever use it again. Replace it with fgets() and use that instead.
    2. Get rid of void main and replace it with int main(void) and return 0 at the end of the function.
    3. Get rid of conio.h and other antiquated DOS crap headers.
    4. Don't cast the return value of malloc, even if you always always always make sure that stdlib.h is included.

  2. #32
    Banned
    Join Date
    May 2007
    Location
    Berkeley, CA
    Posts
    329
    Please note that he doesn't use the term 'address'.

  3. #33
    Registered User claudiu's Avatar
    Join Date
    Feb 2010
    Location
    London, United Kingdom
    Posts
    2,094
    Quote Originally Posted by Overworked_PhD View Post
    Again, you are namedropping with no actual relation between the post and what we were discussing. Also, the fact that these people actually talk to you, doesn't mean they care about you, or that the bunch of you are buddies.
    1. Get rid of gets(). Never ever ever use it again. Replace it with fgets() and use that instead.
    2. Get rid of void main and replace it with int main(void) and return 0 at the end of the function.
    3. Get rid of conio.h and other antiquated DOS crap headers.
    4. Don't cast the return value of malloc, even if you always always always make sure that stdlib.h is included.

  4. #34
    Registered User claudiu's Avatar
    Join Date
    Feb 2010
    Location
    London, United Kingdom
    Posts
    2,094
    Quote Originally Posted by Overworked_PhD View Post
    Please note that he doesn't use the term 'address'.
    You are a troll. You don't know any C. Stop wasting my time. Stop troll-bombing threads. Most importantly STOP GIVING OUT WRONG INFORMATION. And for God's sake stop being a troll.
    1. Get rid of gets(). Never ever ever use it again. Replace it with fgets() and use that instead.
    2. Get rid of void main and replace it with int main(void) and return 0 at the end of the function.
    3. Get rid of conio.h and other antiquated DOS crap headers.
    4. Don't cast the return value of malloc, even if you always always always make sure that stdlib.h is included.

  5. #35
    Banned
    Join Date
    May 2007
    Location
    Berkeley, CA
    Posts
    329
    Yes it does. You had said

    No, pointers don't point to values, they point to locations in memory.
    His points seems to imply something different.
    Last edited by Overworked_PhD; 05-01-2010 at 04:49 PM.

  6. #36
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    We should get you two a room
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  7. #37
    Banned
    Join Date
    May 2007
    Location
    Berkeley, CA
    Posts
    329
    Quote Originally Posted by claudiu View Post
    You are a troll. You don't know any C. Stop wasting my time. Stop troll-bombing threads. Most importantly STOP GIVING OUT WRONG INFORMATION. And for God's sake stop being a troll.
    I'm not proficient with C, but I know enough that I could run circles around you in real life. Seriously, if we ever had a real life programming show down, I would clown you on every programming problem. I wouldn't need google or any other resource to aid me either.

    And when I say every programming problem, I'm talking about problems ranging from sorting algorithms to operating system (paging) algorithms to basic compiler construction.

  8. #38
    Registered User claudiu's Avatar
    Join Date
    Feb 2010
    Location
    London, United Kingdom
    Posts
    2,094
    [QUOTE=Overworked_PhD;942903]Yes it does. You had said

    No, pointers don't point to values, they point to locations in memory.
    [/code]

    His points seems to imply something different.
    Yes he uses the word aim, to indicate that the pointer used in that example is pointing to an address where a value of type double is stored you troll. He is correct in his explanation but he is using troll language because he knows he is dealing with an idiotic question. It's called Irony, however you need to have a certain level of education to be able to cast that magic power. Otherwise, you will find yourself to not have sufficient "mana'.
    1. Get rid of gets(). Never ever ever use it again. Replace it with fgets() and use that instead.
    2. Get rid of void main and replace it with int main(void) and return 0 at the end of the function.
    3. Get rid of conio.h and other antiquated DOS crap headers.
    4. Don't cast the return value of malloc, even if you always always always make sure that stdlib.h is included.

  9. #39
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    [QUOTE=Overworked_PhD;942903]Yes it does. You had said

    No, pointers don't point to values, they point to locations in memory.
    [/code]

    His points seems to imply something different.
    Only if you don't speak English. As a native English speaker, I can vouch for the fact that his post does, in fact, imply that the pointers point to objects stored by the program (presumably in memory).

  10. #40
    Banned
    Join Date
    May 2007
    Location
    Berkeley, CA
    Posts
    329
    Quote Originally Posted by MK27 View Post
    We should get you two a room
    I would clown this bozo in real life. Seriously. After I was done, he would be going back to his college and asking for a refund.

  11. #41
    Registered User claudiu's Avatar
    Join Date
    Feb 2010
    Location
    London, United Kingdom
    Posts
    2,094
    Quote Originally Posted by Overworked_PhD View Post
    I would clown this bozo in real life. Seriously. After I was done, he would be going back to his college and asking for a refund.
    At least I went to college, and graduate school for that reason. You on the other hand are still trying to fight off "alcohoolism & depression" and get into Berkeley. And those are your words not mine. So ........ off.
    1. Get rid of gets(). Never ever ever use it again. Replace it with fgets() and use that instead.
    2. Get rid of void main and replace it with int main(void) and return 0 at the end of the function.
    3. Get rid of conio.h and other antiquated DOS crap headers.
    4. Don't cast the return value of malloc, even if you always always always make sure that stdlib.h is included.

  12. #42
    Banned
    Join Date
    May 2007
    Location
    Berkeley, CA
    Posts
    329
    [QUOTE=claudiu;942907]
    Quote Originally Posted by Overworked_PhD View Post
    Yes it does. You had said



    Yes he uses the word aim, to indicate that the pointer used in that example is pointing to an address where a value of type double is stored you troll. He is correct in his explanation but he is using troll language because he knows he is dealing with an idiotic question. It's called Irony, however you need to have a certain level of education to be able to cast that magic power. Otherwise, you will find yourself to not have sufficient "mana'.
    You are the only one that seems to think the he is implying that it is pointing to an address. I don't and I bet a vast majority of the regulars on comp.lang.c don't think so either.

  13. #43
    Banned
    Join Date
    May 2007
    Location
    Berkeley, CA
    Posts
    329
    [QUOTE=tabstop;942908]
    Quote Originally Posted by Overworked_PhD View Post
    Yes it does. You had said



    Only if you don't speak English. As a native English speaker, I can vouch for the fact that his post does, in fact, imply that the pointers point to objects stored by the program (presumably in memory).
    There is an old usenet post by Jacob, the author of lcc for Windows, who talks about working a on platform where the pointers don't actually point to a location in memory.

  14. #44
    Registered User claudiu's Avatar
    Join Date
    Feb 2010
    Location
    London, United Kingdom
    Posts
    2,094
    Quote Originally Posted by Overworked_PhD View Post
    I'm not proficient with C, but I know enough that I could run circles around you in real life. Seriously, if we ever had a real life programming show down, I would clown you on every programming problem. I wouldn't need google or any other resource to aid me either.

    And when I say every programming problem, I'm talking about problems ranging from sorting algorithms to operating system (paging) algorithms to basic compiler construction.
    Yeah right. I told you before I don't have that much time to troll around with you on "programming competitions". I have a real life, a job and a family to worry about. Besides what would you do without a direct link to Dr. Sosman to ask what you are doing wrong whenever you get schooled on something, a phenomenon that has been occurring every day for the past week.
    1. Get rid of gets(). Never ever ever use it again. Replace it with fgets() and use that instead.
    2. Get rid of void main and replace it with int main(void) and return 0 at the end of the function.
    3. Get rid of conio.h and other antiquated DOS crap headers.
    4. Don't cast the return value of malloc, even if you always always always make sure that stdlib.h is included.

  15. #45
    Banned
    Join Date
    May 2007
    Location
    Berkeley, CA
    Posts
    329
    Quote Originally Posted by claudiu View Post
    Yeah right. I told you before I don't have that much time to troll around with you on "programming competitions". I have a real life, a job and a family to worry about. Besides what would you do without a direct link to Dr. Sosman to ask what you are doing wrong whenever you get schooled on something, a phenomenon that has been occurring every day for the past week.
    Yet you can find the time to act like a total douche on this joint.

Page 3 of 8 FirstFirst 12345678 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. another do while question
    By kbpsu in forum C++ Programming
    Replies: 3
    Last Post: 03-23-2009, 12:14 PM
  2. opengl DC question
    By SAMSAM in forum Game Programming
    Replies: 6
    Last Post: 02-26-2003, 08:22 PM
  3. sort problem for an exam
    By rjeff1804 in forum C Programming
    Replies: 10
    Last Post: 02-12-2003, 09:33 PM
  4. another exam question
    By rjeff1804 in forum C Programming
    Replies: 4
    Last Post: 02-12-2003, 09:29 PM
  5. The AP Exam.....
    By RoD in forum A Brief History of Cprogramming.com
    Replies: 32
    Last Post: 02-10-2003, 08:46 PM

Tags for this Thread


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