Write C++ program to print ASCII value of all Uppercase Alphabet

Introduction

I have used CodeBlocks compiler for debugging purpose. But you can use any C++ programming language compiler as per your availability.

#include <iostream>
using namespace std;
 
int main()
{
    char c;
 
    // Printing ASCII value of all Uppercase Alphabet
    for(c = 'A'; c <= 'Z'; c++){
       cout << "ASCII value of: " << c << " = " << (int)c <<endl;
    }
    return 0;
}

Result

Write C++ program to print ASCII value of all Uppercase Alphabet
Write C++ program to print ASCII value of all Uppercase Alphabet

Leave a Comment