C examples for Statement:for
A nested loop is one loop inside another loop.
#include <stdio.h> #define ROWS 6// ww w . j ava 2 s . c om #define CHARS 10 int main(void){ int row; char ch; for (row = 0; row < ROWS; row++) { for (ch = 'A'; ch < ('A' + CHARS); ch++) printf("%c", ch); printf("\n"); } return 0; }