I created an array with 26 letters and I want to assign each elements to their ASCII values like that:
ASCII[0] = 65
ASCII[1] = 66
I'd already defined ASCII[0] as "A" in my array. So the result that I hope should be:
A = 65
B = 66
So what is the problem?Here is my code:
#include <cs50.h>
#include <stdio.h>
#define SIZE 26
int main(void)
{
string ASCII[SIZE] = {"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"};
for(int i=0; i<26; i++)
{
ASCII[i] = i+65;
}
}