Programming Languages C# Objective
Mar 06, 2013

Which is the correct ways to set a value 3.14 in a variable pi such that it cannot be modified?

Choose the correct answer:
A) float pi = 3.14F;
B) #define pi 3.14F;
C) const float pi = 3.14F;
D) const float pi; pi = 3.14F;
Detailed Explanation

Option C is the right answer.

Discussion (0)

No comments yet. Be the first to share your thoughts!

Share Your Thoughts
Feedback