This is an old revision of the document!
A “for” loop is a top driven loop that will test the condition of a statement before the loop begins to see if it is true. It is a control flow statement that is less “messy” than other types, as while it needs more conditions in order to run, it needs less input code in order to run. An example of a “for” loop is as follows:
for (index=0;index<10;index=index+1) {
fprintf (stdout,"%\n", index);
}
The looping variable is “index”, the loop starts when index=0, will continue to loop as the index increases by a value of 1 for each loop, and will stop/end when index=10, with the value stored in “index”.
A type of control flow statement that will continue to run whatever code is written in the body as long as the predetermined condition is met. For example, in this class, we see the while loops with the condition (1) which simply means “true.” This means that as long as the condition is true (1) the loop will continue to run until it is interrupted by the user. The format we see in this class is
while (1) { task we wish to repeat here }
A bitwise AND is one of the multiple different bitwise functions that can be used not only to strengthen code but also to shorten code and make the code more succinct and more efficient. A bitwise AND is represented by the “&” symbol and
A bitwise operation that moves all bits in an operand to the left by a specific number of positions. What does this mean? In C, we use « to represent a left shift of one place. We could also do «# to left shift that specific number of places. In practice, this would shift the ones place to the twos place, the twos place to the fours place, the fours place to the eights place, and so on so fourth. In the context of this project, when used in a loop, this operation would allow us to perform sequential operations on a specific value of multiple bits by successively shifting the value one place to the left with each loop.