#include <stdio.h>
#include <stdlib.h>
char str[4][6] = {
{"PIC16"},
{"PIC18"},
{"PIC24"},
{"DSPIC"}
};
unsigned char row, column;
int main(void)
{
printf("access string using array method\n");
for(row = 0; row < 4; row++)
{
column = 0;
while(str[row][column] != 0x00)
{
printf("%c",str[row][column]);
column++;
}
printf("\n");
}
printf("----------------------------------\n");
printf("access string using array + pointer method\n");
for(row = 0; row < 4; row++)
{
column = 0;
while((*(str[row]+column)) != 0x00)
{
printf("%c", *(str[row]+column));
column++;
}
printf("\n");
}
while(1)
{
}
system("pause");
return 0;
}