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

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

1. float pi = 3.14F;

2.#define pi 3.14F;

3.const float pi = 3.14F;

4.const float pi; pi = 3.14F;

Posted Date:-2021-02-25 03:24:19


More MCQS Questions and answers

Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!