Which statement is false?

a) The const qualifier enables the programmer to inform the compiler that the value of a particular variable should not be modified.
b) The const qualifier did not exist in early versions of C; it was add-ed to the language by the ANSI C committee.
c) Using the const qualifier typically violates the principle of least privilege
d) Adding const to C programs that do not use it presents significant opportunities for improvement in the software engineering of that code.

c) Using the const qualifier typically violates the principle of least privilege

Computer Science & Information Technology

You might also like to view...

This manipulator causes the field to be left justified with padding spaces printed to the right:

a. left_justify b. right c. left d. left_pad e. None of these

Computer Science & Information Technology

In Tutorial 15, your Lottery Picker application selected numbers for four different types of lotteries. In this exercise, you enhance the Lottery Picker to select four different sets of number for the five-number lottery and to pre- vent duplicate numbers from being selected (Fig. 17.34). Recall that the lottery is played as follows:

? Five-number lotteries require players to choose five unique numbers in the range of 0–39.
a) Copying the template to your work directory. Copy the C:ExamplesTutorial17 ExercisesEnhancedLotteryPicker directory to your C:SimplyJava directory.
b) Opening the template file. Open the LotteryPicker.java file in your text editor.
c) Iterating over the four lotteries. Add code on line 138 to begin a for statement in your application which will execute four times—once for each lottery. Use variable lottery as the for statement’s counter.
d) Initialize the boolean array. To generate unique numbers in each lottery, you will use a two-dimensional boolean array, uniqueNumber (declared for you in the tem- plate). When a number has been selected for a lottery, the value of that variable in the array (indexed by the lottery and the number selected) will be true. First, you must initialize the value for the lottery’s numbers to false. Add a nested for state-
ment to set the

Computer Science & Information Technology