Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Iteration in C

Name: Anonymous 2010-06-14 3:53

Hi there /prog/.

I know Python, and I'm learning C. Both langs have for loops. Python's nicely iterates over a collection of unknown length. C's usually has you specify the length of the collection at compile time, but what if the length is unknown?

My best newbie guess: you terminate the collection with NULL, or you write an iteration function that returns some end-of-collection value when it's done.

Name: Anonymous 2010-06-15 1:22

>>34
IHBT

Name: Anonymous 2010-06-15 1:23

>>33-34
pantsu

Name: Anonymous 2010-06-15 1:36

>>36
Back to the imageboards, please.

Name: Anonymous 2010-06-15 1:56

>>37
You must be new here.

Name: Anonymous 2010-06-15 2:10

>>38
For knowing proper use of sage doesn't require ``counter-bumping''? Fuck off.

Name: Anonymous 2010-06-15 2:11

>>39
[mail]sage[/mail]

Name: Anonymous 2010-06-15 2:21

>>39
Let me guess, you are one of >>33,34 and ashamed?

Name: Anonymous 2010-06-15 2:24

>>41
No, I am one of the people who feels the fact that you think there aren't enough programming-related threads on the front page doesn't merit shitposting, and one who disagrees with your definition of ``good thread''.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List