Hello guys, here I am sharing some of the simple techniques that can be used to reduce the size of our program. These are very easy (usually ignored by us), by fallowing these we can reduce the size of program to a great extend.
1) Decision on the type of variable needed :-
Every time when you select a variable select it on the basis of its capacity and our requirement in the program
eg.
for(i=0;i<=230;i++)
for the above requirement if we declare i as an int type variable then it will surely increase our memory capacity, whether if we declare it as char variable then it will save our memory while the performance remains same. so select your variable properly.
2) Never ignore the warnings:-
When you compile the program is shows some warning, even if you ignore them , the program will run successfully. In warning it basically shows the names of variables which are declared in the program, but are not used further. by removing such variable you can decrease you RAM usages.
Hope you like these simple techniques,if you have any doubt you are free to post. Keep reading, will add more techniques soon
till then happy programming
No comments:
Post a Comment