Ask your own question, for FREE!
Computer Science 19 Online
OpenStudy (anonymous):

what is const double in c++?

OpenStudy (anonymous):

A "const" declaration means that the variable cannot be changed. A double declaration means a floating point (decimal) number with double precision (meaning you can save more digits). You might use this like so: const double PI = 3.1415926535 You know the value of pi will never change, so you declare it a constant so you can just type PI instead of the number itself.

OpenStudy (anonymous):

With the const prefix you can declare constants with a specific type in the same way as you would do with a variable: const int pathwidth = 100; const char tabulator = '\t'; const double Pi = 3.1415

OpenStudy (anonymous):

Here const is a prefix and double , int , char are the data types .

OpenStudy (anonymous):

Thanks :))

OpenStudy (anonymous):

you're welcome:)

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Latest Questions
Jalissa21: What does adenoma mea?
7 minutes ago 2 Replies 0 Medals
Twilightt: How Can We Prevent Gun Violence in American Schools?
7 minutes ago 4 Replies 1 Medal
Twaylor: possible?
2 days ago 5 Replies 0 Medals
Arriyanalol: hekp
4 days ago 33 Replies 0 Medals
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!