Why constant is unchangeable? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 1

Why constant is unchangeable?

const int x = 10; scanf ("%d",&x);//(new value)

15th May 2020, 4:46 AM
AR SĕŕĆÆĆ©Å›
AR SĕŕĆÆĆ©Å› - avatar
2 Respostas
+ 2
Constants the most case you use when you define magic numbers this number is fixed like upload max size or the absolute path of the application this things will not be modified in the future
15th May 2020, 5:44 AM
mohamed nabil
mohamed nabil - avatar
+ 1
Because const is constant.
15th May 2020, 4:50 AM
CalviÕ²
CalviÕ² - avatar