1. Create a defined constant to allow us to set the size of a game board to 8 units. Show how it would be used.

  2. Explain what the following C would display on the LCD panel:

    #define FRENCH
    #ifdef FRENCH
      lcd_print ( "Bonjour" ) ;
    #endif
    #ifdef ENGLISH
      lcd_print ( "Hello" ) ;
    #endif













Answers
  1. #define MAX_BOARD 8

    int board[MAX_BOARD] [MAX_BOARD];

    for ( i = 0 ; i < MAX_BOARD ; i++ ) { ... }

  2. As FRENCH is defined, the LCD will print 'Bonjour'. You can this kind of mechanism to make programs that can be compiled for a range of languages.