Im using Dev C++ and this program cant run....
This is an example from arrays book from C by dissection
Code:
/* Count each uppercase letters separately */
#include <stdio.h>
#include <conio.h>
#include <ctype.h>
int main(void)
{
int c, i, letter[26];
for (i = 0; i < 26;++i)
letter[i] = 0; //initialize i to zero yep good here
while ((c = getchar()) != EOF) /*Input character and not equal to escape */
if (isupper(c)) /* If it is uppercase */
++letter [c - 'A']; /* <<<< This is the part i do not understand i think its ASCII */
for (i = 0; i < 26; ++i) {
if (i % 6 == 0) /* yeah must have 6 columns till newline */
printf ("/n");
printf ("%4c:%3d", 'A' + i, letter [i]); /* i think i get it the first part is A,B,C,D and the second part addresses the value of letter??? */
}
printf ("\n\n");
getchar();
return 0;
}