Loop issues

I need a template that will show me how to loop though an array at each index. I am not quite sure how this is accomplished, but at the moment I have a ton of IF statements and would like to just use a loop.

1
2
3
4
5
6
7
8
9
10
11
12
char word[100]
.
.
.

// this is where I need the help
for (i=0; <not sure what to put>; i++)
  if (word[i]=='b')
   {
     word[i]='1';
   }
// my IF statements continue on 


I need to output the values of each index of "word" after the loop runs through. If anyone would help me out a little it would be very much appreciated.
closed account (1yR4jE8b)
for (i=0; i < 100; i++) //where 100 is the number of elements in your array, in this case
Topic archived. No new replies allowed.