MCQOPTIONS
Saved Bookmarks
| 1. |
Which of the following is the correct ways to set a value 3.14 in a variable pi such that it cannot be modified? |
| A. | <i class="csharp-code">float pi = 3.14F;</i> |
| B. | <i class="csharp-code">#define pi 3.14F;</i> |
| C. | <i class="csharp-code">const float pi = 3.14F;</i> |
| D. | <i class="csharp-code">const float pi; pi = 3.14F;</i> |
| E. | <i class="csharp-code">pi = 3.14F;</i> |
| Answer» D. <i class="csharp-code">const float pi; pi = 3.14F;</i> | |