C++ Code Example: display characters from a to z using for-Loop

In this code example, all letters of the alphabet are passed through and output with a for loop.

#include <iostream>
using namespace std;

int main () {
    char c;

    for (c = 'A'; c <= 'Z'; c++) {
        cout << c << ", ";
    }
    
    return 0;
}
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