Advanced C Programming Spring 2004 Exercise 6. Download the program from the web, that uses Windows API-function WriteConsole and displays the character A with foreground colour red and background colour white. Write six functions set_fgc_intensity, clear_fgc_intensity, get_fgc_no, set_fgc_no, get_bgc_no and set_bgc_no and test them in the context of downloaded program. Functions set_fgc_intensity and clear_fgc_intensity set or clear the intensity bit of foreground colour in the screen location indicated by it's two parameters. The prototype of the function set_fgc_intensity is void set_fgc_intensity(int row, int column); This is the typical operation that consists of three phases: 1) Read the current value (of attribute in this case). 2) Modify that value as required and 3) Write the modified value back. Hint. The attribute of a given screen location can be read using the Windows Console API function ReadConsoleOutputAttribute. In similar way attribute can be written back so that it has a real effect on the screen using function WriteConsoleOutputAttribute. Function get_fgc_no returns the colour number in the screen location given as a parameter. The prototype is int get_fgc_no(int row, int column); Function set_fgc_no set the foregroung colour without modifying the back ground colour.The prototype of function set_fgc_no is void set_fgc_no(int row, int column, colour); Functions get_bgc_no and set_bgc_no are very similar to the functions get_fgc_no and set_fgc_no, but they manipulate background colours instead of foreground colours. For example the function get_bgc_no returns the background colour number in the creen location given as a parameter. The prototypes of these functions are int get_bgc_no(int row, int column); void set_bgc_no(int row, int column, colour); To test these function make the original program to work as follows. Between each phase make your program to wait input, so that it is posible to see the effect of each function call. 1. Set the intensity bit of red A ON on the screen. 2. Clear the intensity bit of A. 3. Set it back again. 4. Diplay the current foreground colour number and background colour number 5. Ask the user to enter a colour number and set it to the new foregroung colour of A. 6. Ask the user enter a colour number and set it to the new background colour of A