Curioustab
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Home
»
C# Programming
»
Datatypes
Which of the following is the correct ways to set a value 3.14 in a variable pi such that it cannot be modified?
float pi = 3.14F;
#define pi 3.14F;
const float pi = 3.14F;
const float pi; pi = 3.14F;
pi = 3.14F;
Show Answer
Correct Answer:
const float pi = 3.14F;
← Previous
Next →
Discussion & Comments
No comments yet. Be the first to comment!
Name:
Comment:
Post Comment