Solution for Exercise 25-1

ex2501

#include <stdio.h>
#include <stdlib.h>

int main()
{
    char loop;

    puts("Presenting the alphabet:");
    for(loop='A';loop<='Z';loop++);
        putchar(loop);
    return 0;
}

Notes

* The reason you see the [ character when the program fails is that the loop executes from 'A' to 'Z' but doesn't generate any output. When the program finally gets around to the putchar() function, the value of the loop variable is one greater than Z. That's the ASCII code for the [ character.