#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2002
    Posts
    8
    Rep Power
    0

    Suggest a book or site to understand the exact execution of a C/C++ program.


    Hi !
    I had joined C,C++ classes some time ago and now I would like to know how exactly a C/C++ program works, where are the variables and pointers stored and how exactly the if,for, while loops work and where are they stored. I would like to know how the code is executed in complete details. Since I have already completed the course I cannot go back and ask the faculties about it. I am new to programming and hence it took me time ti learn the basics and by the time my classes duration was over.Please suggest a good site/book that can describe and explain these in detail. I would be extremely thankful.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2002
    Location
    Flint, MI
    Posts
    328
    Rep Power
    12
    Infoseeker,

    The storage and execution procedure will depend on your compiler and your operating system. Different compilers on the same operating system will store data and instructions differently.

    If you're new to programming, you'll be better rewarded by focusing on programming fundamentals, and worrying about specific machine implementations later. Kernighan & Ritchie's "The C Programming Language" or Bjarne Stroustrupe's "The C++ Programming Language" are my recommendations for good instruction in that realm. Most importantly, get lots of practice.

    If you don't have a compiler, the Cygwin is free, reasonably standards compliant, and works identically to its UNIX brethren. Of course, if you have a UNIX machine available to you then you probably already have a good compiler suite.
    Clay Dowling
    Lazarus Notes
    Articles and commentary on web development
    http://www.lazarusid.com/notes/
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2002
    Posts
    8
    Rep Power
    0
    Hi !!
    Thanks a lot for the reply and suggestions. I have bought Bjarne Stroustrup's book, but it seems to be very techie..but I am sure with practise I would be able to understand it. Thanks again for the reply.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2002
    Location
    Flint, MI
    Posts
    328
    Rep Power
    12
    infoseeker,

    Stroustrupe's book isn't half so techy as the information you're looking for. The trick with that book is to start and the beggining, work through the exercises (there's an answer manual available as well), and don't get scared by all the big nasty stuff at the end of the book. If you can make it through the first couple of sections, you'll have a very solid programming foundation.

    It's much better for learning than the "Learn C++ in X days" type books. It's also superior to at least the Dietel & Dietel textbooks, which I have taught from.

    It will work best to set yourself some small project to work on. You'll learn your C++ faster by having actual applications to work on. Just remember that even the most basic Windows program is non-trivial, so start with command line programs. I might recommend simple games.
    Clay Dowling
    Lazarus Notes
    Articles and commentary on web development
    http://www.lazarusid.com/notes/
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2002
    Posts
    8
    Rep Power
    0
    Hi ClayDowling,

    Thank you so very much for the information. Its because of people like you that we newbies get the proper direction...I was about to buy the learn C++ in 21 days...no kidding...but now I have decided not to touch it even with a bargepole.....Thanks a lot again for your help...I will be bothering you with more questions about C++ and hope that you would not mind :). Thanks once again.

    Infoseeker
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2002
    Posts
    36
    Rep Power
    13
    Lol i made the mistake of buying C++ in 21 days. Yes, it sucks, i learned nothing with it. They dont explain anything =[
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2002
    Location
    Flint, MI
    Posts
    328
    Rep Power
    12
    Worse than not explaining anything, most of the books aren't teaching you the language. What they're teaching you is how to get some quick results with a specific compiler, and heaven help you if you actually need to put some code behind the pretty interface.
    Clay Dowling
    Lazarus Notes
    Articles and commentary on web development
    http://www.lazarusid.com/notes/
  14. #8
  15. Defensor fidei
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2002
    Location
    Raleigh, NC
    Posts
    24
    Rep Power
    0

    Re: Suggest a book or site to understand the exact execution of a C/C++ program.


    Originally posted by infoseeker
    Hi !
    I had joined C,C++ classes some time ago and now I would like to know how exactly a C/C++ program works, where are the variables and pointers stored and how exactly the if,for, while loops work and where are they stored. I would like to know how the code is executed in complete details. Since I have already completed the course I cannot go back and ask the faculties about it. I am new to programming and hence it took me time ti learn the basics and by the time my classes duration was over.Please suggest a good site/book that can describe and explain these in detail. I would be extremely thankful.
    Just thought I'd let you know that your question really has little to do with C++ and more to do with computer architecture and operation. You get this information from taking assembly language and operating systems courses or reading like texts. Of course I've not read Bjarnes book ( I know heresy, I'm disavowed ) maybe this is covered in it?
  16. #9
  17. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2002
    Location
    Flint, MI
    Posts
    328
    Rep Power
    12
    This topic is most definitely not covered in the Stroustrup book, Xdeth, and you are dead on about where a person should go look for that information.
    Clay Dowling
    Lazarus Notes
    Articles and commentary on web development
    http://www.lazarusid.com/notes/
  18. #10
  19. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jan 2002
    Location
    Seattle WA
    Posts
    863
    Rep Power
    14
    Heh, those 21 days books though are excellent for people who are already programmers. I learned C++ from the Sams 21 day one, and it was exactly what I needed. I know programming, I just needed to know the syntax of how the language worked. That and pointers.
  20. #11
  21. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2002
    Location
    St George, UT/USA
    Posts
    2
    Rep Power
    0
    I am presently working on a CIS degree--I had never programmed anything in my life before this, except for simple 1 or 2 line DOS scripts and some WP 5.1 macros. The best book I have found that explains C++ understandably is the "C++ Black Book", and I've gone through a ton of them. Unfortunately I didn't find this one until after I retook Data Structures!

IMN logo majestic logo threadwatch logo seochat tools logo