How to write the alphabet in C with a loop?
The following codes display the 26 letters of the alphabet in C:
char c;
// Displays abcdefghijklmnopqrstuvwxyz
for (c='a'; c<='z' ; c++) printf ("%c", c);
// Displays ABCDEFGHIJKLMNOPQRSTUVWXYZ
for (c='A'; c<='Z' ; c++) printf ("%c", c);
Check this online example on repl.it.
The following codes display the 26 letters of the alphabet in C:
char c;
// Displays abcdefghijklmnopqrstuvwxyz
for (c='a'; c<='z' ; c++) printf ("%c", c);
// Displays ABCDEFGHIJKLMNOPQRSTUVWXYZ
for (c='A'; c<='Z' ; c++) printf ("%c", c);
Check this online example on repl.it.
The following codes display the 26 letters of the alphabet in C:
char c;
// Displays abcdefghijklmnopqrstuvwxyz
for (c='a'; c<='z' ; c++) printf ("%c", c);
// Displays ABCDEFGHIJKLMNOPQRSTUVWXYZ
for (c='A'; c<='Z' ; c++) printf ("%c", c);
Check this example online on repl.it.
# | ID | Query | URL | Count |
---|