### Easy trick to mentally calculate percentages

Situation when we need to calculate the percentages in our mind are quite common. While calculating the VAT, Insurance premium or Tips at restaurant, we thought of percentages or perhaps if we are earning then we would have thought about percentage of our salary we are paying for rent, food or fuel for our vehicle. These are real life situation and we are often asked in the competitive examinations.

Basic Percentage Review

So what is the easiest way to calculate percentages? Here are some tips to quickly find percentages mentally. Think like this:
• There are some percentages that are easy to calculate mentally. 50% means half, 25% means 1/4 and 75% means 3/.
• Finding 10% of a number is one of the most useful and also one of the easiest. To find 10% all we need to do is move/shift the decimal one place to the left. Thus 10% of 543 = 54.3, pretty simple!
• 1% is just as easy too. Shifting the decimal point to 2 digits left. So, 1% of 654 = 6.54
• 100% is the easiest by far. The number does not change. So, 100% of 765 is the number itself i.e. is 765.
• 50% is just the number divided by 2. So, 50% of 444 = 222.
• How 5% works. It’s just half of 10%. Simply 2 steps in any order (1) Take 10% (2) Divide by 2. You can take 10% first or divide by 2 first, it does not matter. For example, 5% of 44 =? 10% of 44 is 4.4 and divide by 2 gives us 2.2. So, 5% of 44 = 2.2. Again, 5% of \$24.80=? a) \$24.80 -->> \$2.48 (moving the decimal point one place to the left) and b) \$2.48 / 2 = \$1.24.
• 15% is just 10%+5% and we already know how to solve these. So, 15% of 24 =? 10% of 24 is, well, take the decimal to one digit left to get 2.4 and 5% is just half of 10%. So we divide 2.4 by 2 to get 1.2. So, add them up 2.4+1.2= 3.6 which is 15% of 24.
• 20% of 120=? 20% is nothing but 10%+10% (breaking up into friendly parts). So, 10% of 120 is 12 (shifting the decimal one place to the left) and double of that would be 24. Again, 20% of 132=? 10% would be 13.2 and 20% would be double of that that is 26.4
• 60% of 320=? 60%=50%+10%, so 50% of 320 would be 160 and 10% would be 32. So, our final answer would be 160+32 which is 192.
• 75% is doing the same thing-breaking it up into friendly parts/numbers. 75% of 880=? You can break it up by 50%+25%. 50% of 880 gives us 440. Now we need to find 25% of 880. Now, 25% is just half of 50% and we already solved 50%, so just take half of that. 440 divided by 2 gives us 220. Now as we broke it up, we have to put it back together. So our final answer is 440+220 =660.
• 95% of 2400 =? Break it up into friendly parts/numbers. So break it 2 parts- 100% and 5%. The 100% of 2400 does not change. So, 100% of 2400=2400 and 5% of 2400=? To find 5%, take 10% and then divide by 2. 10% of 2400 is 240 and half of 240 is 120, so 5% of 2400 is 120. Now as we broke it up, we have to put it back together. So, 100% - 5% =2400-120=2280.
• 110% of 140=? 110%=100%+10%, 100% is the number itself which is 140 and 10% of 140 is 14 so 140+14=154.
We can use same breaking up techniques to solve ANY percentage problem.
• 31% of 222=? Breaking up 31% by 10%+10%+10%+1%. Now, 10% of 222 just gives us 22.2. Because we have 3 sets of 10%, we need to multiply 22.2 by 3 to get 66.6 (10%+10%+10% is the same as 3x10%). Lastly we need to find 1% of 222 which gives us 2.22. So, our final answer is 66.6 +2.22 =68.82
• 21% of 150=? 21%=10%+10%+1%. Now 10% of 150 would be 15. So, 20% would be double of 15 that is 30 and1% of 150 would be 1.5. So final answer would be 30+1.5 which is 31.5
• 17% of 300=? Break 17% into 10% + 5% + 2%. Now calculate; 10% of 300 is 30, 5% of 300 is half of 10% (i.e. 30/2= 15) and 2% (2x1% of 300 = 2x3 = 6). So it all add up to 51.
• Let’s try 97% of 195. 97% is probably broken down easiest into 100%-3%. 1% of 195 =1.95. Now multiply it by 3 to get 5.85. So our final answer is 195-5.85=189.15
• 98% of 250=? 98% is 100%-2%. 100% of 250 is 250 and 1% would be 2.5 (decimal will shift 2 places towards the left). 2% would be 5. So our final answer would be 250-5 i.e. 245.
• 167% of 195=? One way to break it up is 100%+50%+25%+1%. We know 100% of 195 is 195. 50% is just half of 195 which is 97.5. 25% of 195 is just half of 97.5 which is 44.25. 1% of 195 is 1.95. And finally we just add them all up to get, 195 + 97.5 + 44.25 + 1.95 = 342.2
• There are many different ways to look at a problem. Say, 42% of 366=? 2 different ways to solve the same problem. We can do this by taking (a) 4x10% + 2x1% or (b) we can also do it a different way by taking 50% and subtracting 8% i.e. 50% - 1%x8. Both are same, both give us the same answer.  a) 4x10% + 2x1%. 10% is 36.6 and 1% is 3.66. Now, 4x36.6=146.4 and 2x3.66=7.32; adding them up is 153.72. b) 50% - 1%x8. 50% is half of 366 which is 183 and 8% is 3.66x8 = 29.28; subtracting the two gives us 183-29.28=153.72, the same answer as before.
• 62% of 420 would be 50%+10%+2% which is 210 + 42 + 8.4 = 260.4
• 22% of 324 would be 10%+10%+2% i.e. 32.4×2 +3.24×2 = 64.8 + 6.48 = 71.28
• 16% of 42 would be 10%+5%+1% i.e. 4.2 + 2.1 + 0.42   = 6.72.

a% of b = b% of a

• It may not be immediately clear, but it’s true: a% of b = .01 × a × b, which is the same as b% of a (.01 × b × a).
• What’s 16% of 25? The same as 25% of 16: 4
• What’s 43% of 200? Same as 200% of 43: 86.

### C Questions

C Questions
C Questions

Note : All the programs are tested under Turbo C/C++ compilers.
It is assumed that,
Programs run under DOS environment, The underlying machine is an x86 system, Program is compiled using Turbo C/C++ compiler.
The program output may depend on the information based on this assumptions (for example sizeof(int) == 2 may be assumed).
Predict the output or error(s) for the following:

void main()
{
int const * p=5; printf("%d",++(*p));
}
Compiler error: Cannot modify a constant value.
Explanation:
p is a pointer to a "constant integer". But we tried to change the value of the "constant integer".
main()
{
char s[ ]="man"; int i;
for(i=0;s[ i ];i++)
printf("\n%c%c%c%c",s[ i ],*(s+i),*(i+s),i[s]);
}
aaaa nnnn
Explanation

### Zoho Interview | Set 1 (Advanced Programming Round)

Third Round: (Advanced Programming Round) Here they asked us to create a “Railway reservation system” and gave us 4 modules. The modules were:
1. Booking
2. Availability checking
3. Cancellation
4. Prepare chart
We were asked to create the modules for representing each data first and to continue with the implementation phase.

My Solution :