Search:

Type: Posts; User: potomac

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. A question on arrays and pointers and right associativity

    I've got another question that hinges on right associativity.

    I got to the next chapter, on pointers and arrays, and was having some difficulty understanding the statements in this chart. I...
  2. Replies
    3
    Views
    3,503

    I think a lot of it comes down to right...

    I think a lot of it comes down to right associativity. Up until this point in the book, we had only used left associative operators, not right ones like * and &. I flipped to the Appendix on...
  3. Replies
    3
    Views
    3,503

    Thanks hobbit. that's very helpful happy new...

    Thanks hobbit. that's very helpful

    happy new year to you too
  4. Replies
    3
    Views
    3,503

    A couple questions on Pointer Assignment

    I think I'm getting the hang of pointer basics with my textbook. I've read the chapter a couple times now and it's starting to make sense

    A few lingering questions from the exercises I completed
    ...
  5. That makes sense. Have to keep repeating to...

    That makes sense. Have to keep repeating to myself that a pointer is an address.

    After reading my 2 book chapters twice, reading Alex's tutorial, and watching some videos, I'm at this phase...
  6. Unsure of this Quiz Question on Pointers Created by Alex

    This is the only question I got wrong on Alex's quiz for beginners. I'm unsure why it's correct. I drew out what I think the sentences represent.

    I don't get why the unnamed variable pointed to by...
  7. I don't intend to do anything with that...

    I don't intend to do anything with that knowledge. Just a curiosity.

    I was particularly interested in just seeing if a single line of JavaScript can sometimes be equivalent to a ton of lines of C....
  8. Could you say that the Python code "received" by...

    Could you say that the Python code "received" by interpreter will always match up with a line/several lines of C or C++ code?

    What would be the best way to look at that open source Python code and...
  9. Ah thanks that worked! Thanks

    Ah thanks that worked! Thanks
  10. Whoops, I missed that scanf &. Also...

    Whoops, I missed that scanf &.

    Also corrected those style error

    I still, however, get compiler errors for uninitialized variables f1 and i

    14986
  11. Trying to Replicate These Two Program Examples Demonstrating Utility of Pointers

    I'm continuing on with my textbook and going through the examples on pointers.

    There's one example that compares two similar programs to illustrate the value of using pointers as arguments to...
  12. What does it mean when people say that Python and JS Libraries are "written in C"?

    I've heard this said before and it half makes intuitive sense. One example is this video at the 1 minute mark: Why C Programming Is Awesome - YouTube

    I think it might have something to do with...
  13. Thanks for the responses again guys. Very...

    Thanks for the responses again guys. Very helpful. Salem's mail analogy was good. Hobbit, I get why pointers are useful now thanks to your elaboration (so you can avoid relying on copying a...
  14. ^ I think I should have written pointer variable...

    ^ I think I should have written pointer variable in my title?

    Is there a difference between a pointer variable and a pointer?

    Does a pointer consist of a pointer variable + an address?

    I've...
  15. This was the text from my book that I'm basing my...

    This was the text from my book that I'm basing my simplified mental map on:



    (page 207)
    The * operator relates to pointer variables. The act of declaring a pointer variable sets aside memory...
  16. Is this analogy for pointers (*operator), addresses (& operator) and variables valid?

    I was wondering if this is the right way to think about pointers (*operator), addresses (& operator) and variables. I'm giving a simplified explanation in the black boldface text, and a more...
  17. That also is helpful in refining my understanding...

    That also is helpful in refining my understanding because I think I have been assuming the "top" to be pointing to the right-most slot to be filled with a value. Rather than 1 slot (unfilled) ahead...
  18. Hobbit, the comment about the array not zeroing...

    Hobbit, the comment about the array not zeroing out is helpful. I didn't think to consider that the data stays there in memory until written over

    So the result I'm seeing it entirely consistent...
  19. Here's a PDF showing what I saw on my screen in...

    Here's a PDF showing what I saw on my screen in my debugger. File was 2.5 mb and I couldn't upload it to the board: https://www.pdf-archive.com/2016/12/23/walkthrough/

    It's showing that the stack...
  20. I managed to trace the array and variable c in...

    I managed to trace the array and variable c in Visual Studio

    It looks like this is the trace for: (){}

    So it doesn't look like the array is totally clear at the end. Also, the array never has...
  21. Thanks for the tip on "Watch" I was able to...

    Thanks for the tip on "Watch"

    I was able to add one for the array

    14984
  22. I get the idea of a basic stack (LIFO), but this...

    I get the idea of a basic stack (LIFO), but this program's execution has me flummoxed.

    Is there a way I can modify my code so that I can see the values contained in the stack as I step through...
  23. Breakpoint 39 solved it! I'll have to remember...

    Breakpoint 39 solved it! I'll have to remember that the issue with my breakpoints is always an "off by one line" of sorts!

    So is the array only ever filled with one character or two characters in...
  24. Is My Interpretation of This Program Implementing a Stack Correct?

    I made it to the chapter in my book on program organization. It also introduced the concept of the stack data structure and gave this example program. Full code and question text is below

    I have...
  25. ^ Funny that you mention C99. I'm using the 1st...

    ^ Funny that you mention C99. I'm using the 1st edition (1996) of the KN King book. There is a 2nd edition from 2008.

    I have it only because it was about $100 cheaper than the 2nd edition on...
Results 1 to 25 of 45
Page 1 of 2 1 2