Chapter 8: C Pointers and Arrays
c2 = *(howdy + 4); // c2 = ‘y’ using pointer notation
seusmore = &howdy[i]; // confuseusmore points to ‘y’
seusmore = howdy + i - 1; //confuseusmore points to ‘d’
o test this, make a new directory Pointer Array Test, copy the stuff from PC
Demonstrator.c to:
useusmore(void);
brate the oscillator:
OSCCAL_calibration();
har s[])
confu
confu
T
Comm directory. Change the
// Demonstrator.h Pointer Array Test version
void initializer(void);
void Test(void);
void SayHowdy(void);
void Confuseus(void);
void Conf
void parseInput(char *);
Change the Demonstrator.c to:
// Demonstrator.c Pointer Array Test version
#include "PC_Comm.h"
void initializer()
{
// Cali
// Initialize the USART
USARTinit();
// say hello
sendString("\rPointer Array Test.\r\r");
Test();
}
void parseInput(c
{
// Do nothing in this test
}
void Test()
{
// The hard way
sendChar('H');