1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

Simple Basic Problem in C

Discussion in 'C' started by naiya, Jun 24, 2007.

  1. naiya

    naiya New Member

    If I write the following code in program how can I see the output
    Then I can see the numbers from 14761 to 15000.How can I see all the numbers from 1 to 15000.
    Please reply as soon as possible.
    Thanks in advance.
  2. shabbir

    shabbir Administrator Staff Member

    [COMMENT]This is by no means an article and so use the New thread button rather than submit article buttons[/COMMENT]

    Because everything just scrolls up and so you should have some way of having a user input mechanism like scanf, getche or getch functions before the screen-ful of characters goes above the top of the screen.
  3. munkyeetr

    munkyeetr New Member

    Do you need to use the scroll bar in your output screen and scroll up to see the first 14760 iterations? Because I think that code should work.
  4. naiya

    naiya New Member

    Yes I want to use the scroll bar in my output screen and scroll up to see the first
    14760 iterations. How can I do this without using some scanf or getche functions?
  5. munkyeetr

    munkyeetr New Member

    No, no, sorry. I just thought it was a simple mistake of not scrolling the Command window up and seeing the first chunk of the programs output.

    Disregard what I said, I've been eating paint chips again!
  6. DaWei

    DaWei New Member

    Generally speaking, the buffers associated with a command line interface have a limited number of lines stored, even thought it's typically greater than the number of lines visible. If this is the case, then a scroll bar bill covesr the amount buffered. If the buffer holds less than the amount that has been displayed, then that material is lost.

    The whole thing is a somewhat silly question. Computers are not magic. Presume that you have several million tokens and a container to transfer them to. What happens if the container is non-existent, or holds 2000 items, or 2,000,000. It's unlikely that you will find one which is infinite and holds every thing ever displayed to a command window since its creation.

    Think of a way to solve the container/token problem and apply it.
  7. naiya

    naiya New Member

    Thanks to all for your response.

Share This Page