Mind map
C 4 Loops-Iteration
Map content
C 4 Loops-Iteration
4.1 controlled iteration
- for (initialize; guard; update) e.g.
- e.g. for(i = 1; i<= NUM_LINES; i=i+1): statement
- for (initialize; guard; update) e.g.
4.4 uncontrolled iteration
- while (guard) /statement
- Exit the loop
- Achieve a negated guard
- if () {break;}
- Flag
- do (statement) while (guard)
Iterating over the input data
- number: scanf
- scanf('%d',&next)
- character: getchar()
- The int getchar(void) function reads the next available character from the screen and returns it as an integer. This function reads only single character at a time. You can use this method in the loop in case you want to read more than one character from the screen.
- putchar(int c)
- number: scanf
Information
- Description
- Computer Science Mind Map on C 4 Loops-Iteration, created by qinwen sun on 28/02/2017.
- Created by
- qinwen sun
- Views
- 0
- Rating
More on Conditionals and Loops