Thread: Arrays and loops

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Dec 2001
    Posts
    367

    Arrays and loops

    Will this code create an array like this: 1,2,3,4,5,6,7,8,9,10?

    int i_array[10];

    for(int i=0; i<=10; i++)
    {
    i_array[i] = i;
    }
    I couldn't be bothered to search for something similar or to read the FAQ.
    Last edited by Zewu; 05-25-2002 at 09:51 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help using arrays and loops for math
    By LLINE in forum C++ Programming
    Replies: 3
    Last Post: 06-09-2008, 04:09 AM
  2. Too many loops D:
    By F5 Tornado in forum C++ Programming
    Replies: 6
    Last Post: 12-03-2007, 01:18 AM
  3. while loops with arrays
    By volk in forum C Programming
    Replies: 2
    Last Post: 02-04-2003, 07:22 PM
  4. help with arrays and loops
    By jdiazj1 in forum C Programming
    Replies: 4
    Last Post: 11-24-2001, 04:28 PM
  5. loops and arrays
    By Unregistered in forum C Programming
    Replies: 3
    Last Post: 10-03-2001, 03:12 PM