How to declare constant variable ?
We can declare constant variable using const keyword.
Example of declaring constant variable
//Syntax for declaring constant variable
data type const variable_name = value;
//float constant
float const pi = 3.14;
//integer constant
int const a = 5;
//character constant
char const yes = 'y';
No comments:
Post a Comment