Blog / Linux Examples March 18, 2015

A to Z Program

This program uses loop to display character from A to Z.

1- type into the shell

vi atoz.c

copy the text below

[cpp]#include <stdio.h>
int main()
char c;
for(c=’A’; c&lt;=’Z’; ++c)
printf("%c ",c);
return 0;


press ESC one time, then :wq

2- type

gcc -o atoz1 atoz.c

3- run the c program



You may also like...