I wanted to say thanks for everyones help. Its been a little bit since a programmed c++ and a long time since c. I dare say they are one of the same but each with their own nuance and personality. I couldn't do another function because eventually this program will be converted to assembly. So the easier my c code, the easier my assembly. After I got my head in the game this is what I came up with:
#include "stdio.h"
int main()
{
unsigned char array[17] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', '\0'};
int i;
char key1[5];
char key2[5];
char key3[5];
char key4[5];
for(i = 0; i < 4; i++)
{
key1[i] = array[i];
}
for(i = 4; i < 8; i++)
{
key2[i - 4] = array[i];
}
for(i = 8; i < 12; i++)
{
key3[i -8] = array[i];
}
for(i = 12; i < 17; i++)
{
key4[i - 12] = array[i];
}
key1[4] = '\0';
key2[4] = '\0';
key3[4] = '\0';
key4[4] = '\0';
for(i = 0; i < 4; i++)
{
printf("Key 1 = %c \n", key1[i]);
}
for(i = 0; i < 4; i++)
{
printf("Key 2 = %c \n", key2[i]);
}
for(i = 0; i < 4; i++)
{
printf("Key 3 = %c \n", key3[i]);
}
for(i = 0; i < 4; i++)
{
printf("Key 4 = %c \n", key4[i]);
}
return 0;
}