Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1) By using #define keyword :-
- #include <iostream>
- using namespace std;
- #define ALL 20
- #define SOME 39
- int main ( )
- {
- int a;
- a=ALL+SOME;
- cout << a;
- return 0;
- }
- 2) By using const keyword :-
- #include <iostream>
- using namespace std;
- int main ( )
- {
- int a;
- const int ALL = 22;
- const int SOME = 30;
- a= ALL+SOME;
- cout << a;
- return o;
- }
- For more visit: http://houseofprogramminglanguages.blogspot.com/
Add Comment
Please, Sign In to add comment