Program 3:To print Alphabets from A-Z
#includeExplanation:<stdio.h> main() { int i; for(i=65;i<=90;i++) { printf("%c\n",i); } }
- Here we declared an integer i.
- Now this program is same as printing numbers from 65 to 90.
- But if you can remember the "ASCII" values of 65 which resembles 'A' and 90 which resembles 'Z' as in ascii sheet. To refer ASCII Values click here.
- So instead of "%d" if we use "%c" it is converted to ascii value.