Exforsys
+ Reply to Thread
Results 1 to 4 of 4

Output Puzzle

This is a discussion on Output Puzzle within the C and C++ forums, part of the Programming Talk category; I have started my practice on my C programming and I have tried my hands on till pointers concepts. Now ...

  1. #1
    sammy is offline Senior Member Array
    Join Date
    Apr 2006
    Answers
    145

    Thumbs up Output Puzzle

    I have started my practice on my C programming and I have tried my hands on till pointers concepts. Now what I want to try out is to code and print all integers, but without using any of the looping concept of C. Can we do this? I will also try if someone could get any ideas share it here. I will also try and let you know once this puzzle is solved.


  2. #2
    Allan is offline Member Array
    Join Date
    May 2006
    Answers
    40
    Yes sammy one way to print all integers, but without using any of the looping concept in C programming language is to use the concept of recursion. I assume you know about the concept of recursion. If not let me know and I will help you learn abut this concept.


  3. #3
    santoshcasshyap is offline Junior Member Array
    Join Date
    Jun 2009
    Answers
    2

    Solution

    :yes,we can by creting a function & intialising a value(out side the function) & calling it recursively & incrementing the value,but this woud eventually lead to infinite loop.....have your say.


  4. #4
    galileopy is offline Banned Array
    Join Date
    Sep 2009
    Answers
    2
    Wouldn't it be easier and faster using tags? or tags are part of the looping concepts of C?

    Last edited by galileopy; 09-29-2009 at 09:48 PM. Reason: grammar

    •    Sponsored Ads



Latest Article

Network Security Risk Assessment and Measurement

Read More...