Thread: Difference between the outputs.

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Nov 2011
    Posts
    14

    Question Difference between the outputs.

    I am new to C programming. Please , tell me , why there is difference between the outputs of the two programs below.
    Code:
     #include<stdio.h>
    int main()
    {
      int i=0,j=0;
    
    
    
    
      for(;i<=20;i++)
         {
             for(;j<=10;j++)
                {
                         printf("%d\t%d\n",i,j);
                }
    
    
         }
         return 0;
      }
    Code:
     #include<stdio.h>
    int main()
    {
      int i,j;
    
    
    
    
      for(i=1;i<=20;i++)
         {
             for(j=1;j<=10;j++)
                {
                         printf("%d\t%d\n",i,j);
                }
    
    
         }
         return 0;
      }
    Last edited by psaikia; 12-05-2011 at 02:00 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Different outputs on different OS
    By darksifer in forum C Programming
    Replies: 13
    Last Post: 10-19-2010, 01:45 PM
  2. why i getting different outputs?
    By nkrao123@gmail. in forum C Programming
    Replies: 2
    Last Post: 12-08-2009, 08:33 AM
  3. rounding off outputs
    By lastresort in forum C++ Programming
    Replies: 5
    Last Post: 02-21-2005, 07:52 PM
  4. strings and outputs
    By Mule in forum C++ Programming
    Replies: 3
    Last Post: 03-02-2003, 05:39 PM
  5. Outputs
    By kas2002 in forum C++ Programming
    Replies: 3
    Last Post: 10-29-2002, 07:12 PM