ANS1 - 1. [ 20 % ] H igh 104 U ppe r qua rte r 99 M e dia n...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
ECE 4175 QUIZ 2-11-09 (1 of 2) High 104 FIVE PROBLEMS Upper quarter 99 Open book, open notes Median 86 I added 10 points to everyone’s grade. Lower quarter 66 Low 36 1. Consider the BlinkAlive function that we have been using. In conjunction with it, we have used an unsigned char global variable called ALIVECNT. For this problem, discuss the following aspects of [20%] reworking a program containing the function using Daniel Vogh’s suggestion. That is, use ALIVECNT as a local variable within the BlinkAlive function and yet execute BlinkAlive as fast as when ALIVECNT was a global variable. The first time BlinkAlive is called, it is to find ALIVECNT initialized to 247. This problem makes use of what was demonstrated with two files, TestStatic.c and TestStatic2.c, and the printed out QwikBug screens that were discussed in class. a. What change do you make to the “Global variables” section of the program? Remove the declaration unsigned char ALIVECNT; b. What change do you make to the “Initial” function in the program? Remove the initialization line ALIVECNT = 247; c. What change do you make to the “BlinkAlive” function in the program? Begin the function with the line static unsigned char ALIVECNT = 247; d. Based upon our discussion in class, can ALIVECNT in this program be used as a watch variable in QwikBug? [ x ] Yes [ ] No 2. The second template, T2.c, uses a char variable called NEWPB as shown on page 67:
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/08/2011 for the course ECE 4175 taught by Professor Peatman during the Spring '08 term at Georgia Institute of Technology.

Page1 / 2

ANS1 - 1. [ 20 % ] H igh 104 U ppe r qua rte r 99 M e dia n...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online