i'm new to c, can you do this in a for loop?

This is a discussion on i'm new to c, can you do this in a for loop? within the C Programming forums, part of the General Programming Boards category; Code: for(k = j; k< i + 2*i && k<length; k++) Is it okay to have two conditions for k? ...

  1. #1
    Registered User
    Join Date
    Feb 2011
    Posts
    17

    i'm new to c, can you do this in a for loop?

    Code:
    for(k = j; k< i + 2*i && k<length; k++)
    Is it okay to have two conditions for k? k is less than i + 2*i and k is less than length.

  2. #2
    Registered User
    Join Date
    Nov 2010
    Location
    Long Beach, CA
    Posts
    5,427
    Yes.

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21