#include <stdio.h>
void print_alphabet(void)
{
    char a[] = "abcdefghijklmnopqrstuvwxyz";
    int i = 0;
    int n;
    for (n = 0; n <= 9; n++)
    {
        while (a[i] != '\0')
        {
            putchar(a[i]);
            i++;
        }
        putchar('\n');
    }
    return;
}
int main(void)
{
    print_alphabet();
    return 0;
}
I am trying to print the alphabet 10 times with each series on a different line but, when I compile and execute my code, I only get one line of the complete alphabet and 9 blank new line.
 
     
     
    