Q:

Are string characters assigned a numerical value in context of how they are assigned in a programming language?

For context I am fairly new to programming after returning back to it after programming a number of years ago... I was reading Bjarne's intro programming with C++ and was wondering if alphabetical string characters are assigned numerical values for the purpose of comparison. For instance in this example from the book Bjarne shows that the strings are compared through analyzing the first letter of the input for the strings. From what I gather the language has been coded to essentially give the string characters a value of what I am assuming is 1-26 corresponding to the standard US alphabet to compare the letters.
For instance: 
int main()
{
    cout << "Please enter two names\n ";
    string first;
    string second;
    cin >> first >> second;
    if (first<second) 
        cout << first <<"is alphabetically before"<< second <<'\n ' ;
    return 0;
}

A:

if (first<second) 

In this case, there is something different involved here, the operator< from std::basic_string.

and was wondering if alphabetical string characters are assigned numerical values for the purpose of comparison.

No, not really. You don't assign a number to a character just for comparison. A computer does not know anything about characters, a computer just knows numbers. What number represents what letter is defined in a charset, ASCII for example is a widely known one. However, a table alone doesn't help the computer either, since it still does not know what a character is and what it should do with it, therefore, at the end, it is the font which makes the number 65 look like a 'A'. A font is just a file with a list of numbers and images (bitmap, vector, ...) and the computer just draws the image which belongs to the number 65, so as I already said, the computer knows nothing about characters, it just draws images.

