Looping letters using a for loop
#include <stdio.h> int main() /*from w w w.j ava 2s.c o m*/ { char alphabet; for(alphabet='A';alphabet<='Z';alphabet=alphabet+1) { printf(" %c",alphabet); } putchar('\n'); for(alphabet='A';alphabet<='Z';alphabet=alphabet+1) { printf("%d ",alphabet); } putchar('\n'); return(0); }