-> C/C++ :-
Simple way of declaration -
int const a = 52;
const int a =52;
In C programming we have choice of using const keyword, but in C++ we have to use the const keyword.
-> Java :-
In the java programming language we use final keyword.
final int MAX=52;
-> Perl :-
In Perl we have write as below -
use constant a = 52;
-> Python :-
In Python we have write as below -
a = 52
Simple way of declaration -
int const a = 52;
const int a =52;
In C programming we have choice of using const keyword, but in C++ we have to use the const keyword.
-> Java :-
In the java programming language we use final keyword.
final int MAX=52;
-> Perl :-
In Perl we have write as below -
use constant a = 52;
-> Python :-
In Python we have write as below -
a = 52
Comments
Post a Comment
Please share your experience.....