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