print Alphbets from A-Z in small form:
#include<stdio.h>
main()
{
int i;
for(i=97;i<=122;i++)
{
printf("%c",i);
}
printf("\n");
}
Output:
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Explanation:
1.Here we declared an integer
2.Now this program is same as printing numbers from 97 to 122.
3.But if you can remember the "ASCII" values of 97 which resembles 'a' and 122 which resembles 'z' as in ascii sheet. To refer ASCII Values click here.
4.So instead of "%d" if we use "%c" it is converted to ascii value.