Sunday, November 27, 2011

Output & Errors

void 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]);
}

Output & Errors

void main()
{
  int const *p=100;
  printf("%d" , ++(*p));
}

Successive increase in quantity by certain percentage.

Suppose X units of an item is available. p% is added to it first. Then q% of the increased quantity is added. Again r% of the increased quantity is added.

If the current amount becomes Y unit then, initial amount X is calculated using the following relation:

Wednesday, November 23, 2011

If A is p% of C and B is q% of C, then A is...

If A is p% of C and B is q% of C, then A is

Sunday, November 20, 2011

X is increased by p% and later decreased by q% then net change...

If any value X is first increased by p% and later decreased by q% then the net increase or decrease is given by:

X is increased by p% and later decreased by p% then net change...

If a value say X is increased by p% and later decreased by p% then the net change is always a decrease in percentage, which is given by:

If A is p% less than B, then B is.....

If A is p% less than B, then B is

If A is p% more than B, then B is.....

If A is p% more than B, then B is (100 × p / (100 + p))% less than A.

Sunday, November 13, 2011

Relation Between L.C.M. and H.C.F.

  • Product of Two Numbers = Product of their L.C.M. and H.C.F.

H.C.F. and L.C.M. of Fractions

  • H.C.F. = (H.C.F. of Numerators) / (L.C.M. of Denominators)

Least Common Multiple (L.C.M)

The least number which is exactly divisible by each one of the given numbers.

Least Commmon Multiple(L.C.M) can be calculated by any of the following methods:

Saturday, November 12, 2011

Highest Common Factor(H.C.F.) / Greatest Common Divisor (G.C.D.)

H.C.F of two or more numbers is the greatest number that can exactly divide each one of the number. It is also known as Greatest Common Divisor (G.C.D.).

Example:
       Consider the two numbers 4,16.
       The numbers that can divide 4 and 16 are 2,4.
       Here 4 is the highest number that can exactly divide both 4 and 16 , so 4 is the HCF of 4,16.

H.C.F can be calculated by any of the following methods:

G.P. Series

A series is in Geometric Progression (G.P.), if it has the following form:

a, ar, ar2, ar3,ar4 ....
where a=First term and r=Common ratio.


Some useful derivations from A.P. Series:

A.P. Series

A series is in Arithmetic Progression (A.P.), if it has the following form:
a, a+d, a+2d, a+3d, ....
where a=First term and d=Common difference.


Some useful derivations from A.P. Series:

Series (Natural Numbers)

Addition of Natural numbers.
  • (1 + 2 + 3 + 4 + ..... + n) =n(n + 1) / 2
Addition of Square of Natural numbers.

Thursday, November 10, 2011

Divisibility by 11

if the difference between the sum of the digits at odd places and the the sum of the digits at even places is either 0 or any number divisible by 11.

Example:
  • 49245317 is divisible by 11 since (4+2+5+1)-(9+4+3+7)=-11 which is divisible by 11.
  • 125943 is not divisible.

Divisibility by 10

When the unit digit is 0, the number is divisible by 10.

Example:
  • 13450 is divisible.
  • 98457 is not.

Divisibility by 9

Only when the sum of the digits is divisible by 9.

Example:
  • 45936 is divisible since 4+5+9+3+6=27 is divisible by 9
  • 45901 is not since 4+5+9+0+1=19 is not divisible by 9.

Divisibility by 8

A number is divisible by 8 if the number formed by hundred's ten's and one's place of the number is divisible by 8.

Example:
  • 12398344 is divisible by 8 since the last three digits 344 is divisible by 8.
  • 290125 is not divisible by 8 since the last three digits 125 is not divisible by 8.

Divisibility by 4

Number is divisible by 4 if the sum of its lat two digit is divisible by 4.

Example:
  • 125756 is divisible by 4 since the last two digit 56 is divisible by 4. 
  • 12345 is not divisible by 4 since 45 is not divisible by 4.

Divisibility by 5

Only when theunit digit is 0 or 5.

Example:
  • 5, 10, 25, 50, 100, 205, 1005 etc are divisible by 5.

Wednesday, November 09, 2011

Divisibility by 3

Only when the sum of the digits is divisible by 3.

Example:
  • 24579 is divisible by 3. Since 2+4+5+7+9=27 which is divisible by 3.
  • 13001 is not divisible by 3. Since 1+3+0+0+1=5 which is not divisible by 3.

Divisibility by 2

Only if unit digit of number is any of: 0, 2, 4, 6, 8.

Example: 
  • 12, 102, 696 etc are all divisible by 2, whereas 35, 181 etc are not.