MEPCO ECE
This Blog is dedicated to ECE department students of MEPCO for placement,training and other public adddressing services...
Tuesday, 30 July 2013
Sunday, 17 March 2013
C QUESTIONS...
C QUESTIONS:
[Q001].
The following code is not well-written. What does the program do?
Void
main()
{
int a=1, b=2, c=3,d=4;
printf("%d %d", a, b);
printf (" %d %d", c, d);
}
(a)Run-Time
Error (b)Compile-Time Error (c)1 2 3 4 (d)None of these
Ans.
(c)
__________________________________________________________________________________
[Q002].
What will be the output of the following program :
void
main()
{
int a=1,b=2,c=3;
c=(--a, b++)-c;
printf("%d %d %d",a,b,c);
}
(a)0
3 -3 (b)Compile-Time Error (c)0 3 -1 (d)0 3 0
Ans.
(c)
__________________________________________________________________________________
[Q003].
What will be the output of the following program :
void
main()
{
int a=1,b=2,c=3,d=4,e;
e=(a,a)+(b,c)+(c,d)-(d,b);
printf("%d", e);
}
(a)Compile-Time
Error (b)10 (c)6 (d)2
Ans.
(c)
___________________________________________________________________________________
[Q004].
What will be the output of the following program:
void
main()
{
float val=2.;
printf("%.2",val);
}
(a)Compile-Time
error (b)2.00 (c)%.2 (d)2.000000
Ans.
(c)since there is no ‘f’ .
__________________________________________________________________________________
[Q005].
What will be the output of the following program :
void
main()
{
int a=5;
int b=6;;
int c=a+b;
printf("%d",c);
}
(a)Compile-Time
Error (b)Run-Time Error (c)11 (d)None of these
Ans.
(c)
___________________________________________________________________________________
[Q006].
What will be the output of the following program :
void
main()
{
int i,j;
for (i=1; i<=3; i++)
for (j=1; j<3; j++)
{
if (i == j)
continue;
if ((j % 3) > 1)
break;
printf("%d",i);
}
}
Ans.:2,3
____________________________________________________________________________________
[Q007].
What will be the output of the following program :
#define swap(a,b) temp=a; a=b; b=temp;
void
main()
{
static int a=5,b=6,temp;
if (a > b)
swap(a,b);
printf("a=%d b=%d",a,b);
}
(a)a=5
b=6 (b)a=6 b=5 (c)a=6 b=0 (d)None of these
Ans.
(c)
___________________________________________________________________________________
[Q008].
What will be the output of the following program :
void
main()
{
unsigned int val=5;
printf("%u %u",val,val-11);
}
(a)Compile-Time
error (b)5 -6 (c)5
65530 (d)None of these
Ans.
(c) since 2’s complement of –6 = 65530.
___________________________________________________________________________________
Q009].
What will be the output of the following program :
void
main()
{
int x=4,y=3,z=2;
*&z*=*&x**&y;
printf("%d",z);
}
(a)Compile-Time
error (b)Run-Time Error (c)24 (d)Unpredictable
Ans.
(c) since *&z=z
___________________________________________________________________________________
[Q010].
What will be the output of the following program :
void
main()
{
int i=5,j=5;
i=i++*i++*i++*i++;
printf("i=%d ",i);
j=++j*++j*++j*++j;
printf("j=%d",j);
}
(a)Compile-Time
Error (b)i=1680 j=1680 (c)i=629 j=6561 (d)i=1681 j=3024
Ans.
(c) Compiler dependent
__________________________________________________________________________
Sunday, 3 March 2013
Basics for Numerical Ability
Basis formulas for solving aptitude numerical ability problems. Don't memorize everything because you might have already studied lot of them. Just refresh it. For some special and sure problems(ex:prob on trains)formulas are very essential to save time in calculation.
FORMULA LIST:
ALGEBRA :
1.Sum of first n natural numbers = n(n+1)/2
2.Sum of the squares of first n natural numbers = n(n+1)(2n+1)/6
3.Sum of the cubes of first n natural numbers = [n(n+1)/2]2
4.Sum of first n natural odd numbers = n2
5.Average = (Sum of items)/Number of items
Arithmetic Progression (A.P.):
An A.P. is of the form a, a+d, a+2d, a+3d, ...
where a is called the 'first term' and d is called the 'common difference'
1.nth term of an A.P. tn = a + (n-1)d
2.Sum of the first n terms of an A.P. Sn = n/2[2a+(n-1)d] or Sn = n/2(first term + last term)
Geometrical Progression (G.P.):
A G.P. is of the form a, ar, ar2, ar3, ...
where a is called the 'first term' and r is called the 'common ratio'.
1.nth term of a G.P. tn = arn-1
2.Sum of the first n terms in a G.P. Sn = a|1-rn|/|1-r|
Permutations and Combinations :
1.nPr = n!/(n-r)!
2.nPn = n!
3.nP1 = n
1.nCr = n!/(r! (n-r)!)
2.nC1 = n
3.nC0 = 1 = nCn
4.nCr = nCn-r
5.nCr = nPr/r!
Number of diagonals in a geometric figure of n sides = nC2-n
Tests of Divisibility :
1.A number is divisible by 2 if it is an even number.
2.A number is divisible by 3 if the sum of the digits is divisible by 3.
3.A number is divisible by 4 if the number formed by the last two digits is divisible by 4.
4.A number is divisible by 5 if the units digit is either 5 or 0.
5.A number is divisible by 6 if the number is divisible by both 2 and 3.
6.A number is divisible by 8 if the number formed by the last three digits is divisible by 8.
7.A number is divisible by 9 if the sum of the digits is divisible by 9.
8.A number is divisible by 10 if the units digit is 0.
9.A number is divisible by 11 if the difference of the sum of its digits at odd places and the sum of its digits at even places, is divisible by 11.
H.C.F and L.C.M :
H.C.F stands for Highest Common Factor. The other names for H.C.F are Greatest Common Divisor (G.C.D) and Greatest Common Measure (G.C.M).
The H.C.F. of two or more numbers is the greatest number that divides each one of them exactly.
The least number which is exactly divisible by each one of the given numbers is called their L.C.M.
Two numbers are said to be co-prime if their H.C.F. is 1.
H.C.F. of fractions = H.C.F. of numerators/L.C.M of denominators
L.C.M. of fractions = G.C.D. of numerators/H.C.F of denominators
Product of two numbers = Product of their H.C.F. and L.C.M.
PERCENTAGES :
1.If A is R% more than B, then B is less than A by R / (100+R) * 100
2.If A is R% less than B, then B is more than A by R / (100-R) * 100
3.If the price of a commodity increases by R%, then reduction in consumption, not to increase the expenditure is : R/(100+R)*100
4.If the price of a commodity decreases by R%, then the increase in consumption, not to decrease the expenditure is : R/(100-R)*100
PROFIT & LOSS :
1.Gain = Selling Price(S.P.) - Cost Price(C.P)
2.Loss = C.P. - S.P.
3.Gain % = Gain * 100 / C.P.
4.Loss % = Loss * 100 / C.P.
5.S.P. = (100+Gain%)/100*C.P.
6.S.P. = (100-Loss%)/100*C.P.
RATIO & PROPORTIONS:
1.The ratio a : b represents a fraction a/b. a is called antecedent and b is called consequent.
2.The equality of two different ratios is called proportion.
3.If a : b = c : d then a, b, c, d are in proportion. This is represented by a : b :: c : d.
4.In a : b = c : d, then we have a* d = b * c.
5.If a/b = c/d then ( a + b ) / ( a – b ) = ( d + c ) / ( d – c ).
TIME & WORK :
1.If A can do a piece of work in n days, then A's 1 day's work = 1/n
2.If A and B work together for n days, then (A+B)'s 1 days's work = 1/n
3.If A is twice as good workman as B, then ratio of work done by A and B = 2:1
PIPES & CISTERNS :
1.If a pipe can fill a tank in x hours, then part of tank filled in one hour = 1/x
2.If a pipe can empty a full tank in y hours, then part emptied in one hour = 1/y
3.If a pipe can fill a tank in x hours, and another pipe can empty the full tank in y hours, then on opening both the pipes,
the net part filled in 1 hour = (1/x-1/y) if y>x
the net part emptied in 1 hour = (1/y-1/x) if x>y
TIME & DISTANCE :
1.Distance = Speed * Time
2.1 km/hr = 5/18 m/sec
3.1 m/sec = 18/5 km/hr
4.Suppose a man covers a certain distance at x kmph and an equal distance at y kmph. Then, the average speed during the whole journey is 2xy/(x+y) kmph.
PROBLEMS ON TRAINS :
1.Time taken by a train x metres long in passing a signal post or a pole or a standing man is equal to the time taken by the train to cover x metres.
2.Time taken by a train x metres long in passing a stationary object of length y metres is equal to the time taken by the train to cover x+y metres.
3.Suppose two trains are moving in the same direction at u kmph and v kmph such that u>v, then their relative speed = u-v kmph.
4.If two trains of length x km and y km are moving in the same direction at u kmph and v kmph, where u>v, then time taken by the faster train to cross the slower train = (x+y)/(u-v) hours.
5.Suppose two trains are moving in opposite directions at u kmph and v kmph. Then, their relative speed = (u+v) kmph.
6.If two trains of length x km and y km are moving in the opposite directions at u kmph and v kmph, then time taken by the trains to cross each other = (x+y)/(u+v)hours.
7.If two trains start at the same time from two points A and B towards each other and after crossing they take a and b hours in reaching B and A respectively, then A's speed : B's speed = (vb : v
SIMPLE & COMPOUND INTERESTS :
Let P be the principal, R be the interest rate percent per annum, and N be the time period.
1.Simple Interest = (P*N*R)/100
2.Compound Interest = P(1 + R/100)N – P
3.Amount = Principal + Interest
LOGARITHMS :
If am = x , then m = logax.
Properties :
1.log xx = 1
2.log x1 = 0
3.log a(xy) = log ax + log ay
4.log a(x/y) = log ax - log ay
5.log ax = 1/log xa
6.log a(xp) = p(log ax)
7.log ax = log bx/log ba
Note : Logarithms for base 1 does not exist.
AREA & PERIMETER :
Shape Area Perimeter
Circle ? (Radius)2 2?(Radius)
Square (side)2 4(side)
Rectangle length*breadth 2(length+breadth)
1.Area of a triangle = 1/2*Base*Height or
2.Area of a triangle = v (s(s-(s-b)(s-c)) where a,b,c are the lengths of the sides and s = (a+b+c)/2
3.Area of a parallelogram = Base * Height
4.Area of a rhombus = 1/2(Product of diagonals)
5.Area of a trapezium = 1/2(Sum of parallel sides)(distance between the parallel sides)
6.Area of a quadrilateral = 1/2(diagonal)(Sum of sides)
7.Area of a regular hexagon = 6(v3/4)(side)2
8.Area of a ring = ?(R2-r2) where R and r are the outer and inner radii of the ring.
VOLUME & SURFACE AREA :
Cube :
Let a be the length of each edge. Then,
1.Volume of the cube = a3 cubic units
2.Surface Area = 6a2 square units
3.Diagonal = v 3 a units
Cuboid :
Let l be the length, b be the breadth and h be the height of a cuboid. Then
1.Volume = lbh cu units
2.Surface Area = 2(lb+bh+lh) sq units
3.Diagonal = v (l2+b2+h2)
Cylinder :
Let radius of the base be r and height of the cylinder be h. Then,
1.Volume = ?r2h cu units
2.Curved Surface Area = 2?rh sq units
3.Total Surface Area = 2?rh + 2?r2 sq units
Cone :
Let r be the radius of base, h be the height, and l be the slant height of the cone. Then,
1.l2 = h2 + r2
2.Volume = 1/3(?r2h) cu units
3.Curved Surface Area = ?rl sq units
4.Total Surface Area = ?rl + ?r2 sq units
Sphere :
Let r be the radius of the sphere. Then,
1.Volume = (4/3)?r3 cu units
2.Surface Area = 4?r2 sq units
Hemi-sphere :
Let r be the radius of the hemi-sphere. Then,
1.Volume = (2/3)?r3 cu units
2.Curved Surface Area = 2?r2 sq units
3.Total Surface Area = 3?r2 sq units
Prism :
Volume = (Area of base)(Height)
FORMULA LIST:
ALGEBRA :
1.Sum of first n natural numbers = n(n+1)/2
2.Sum of the squares of first n natural numbers = n(n+1)(2n+1)/6
3.Sum of the cubes of first n natural numbers = [n(n+1)/2]2
4.Sum of first n natural odd numbers = n2
5.Average = (Sum of items)/Number of items
Arithmetic Progression (A.P.):
An A.P. is of the form a, a+d, a+2d, a+3d, ...
where a is called the 'first term' and d is called the 'common difference'
1.nth term of an A.P. tn = a + (n-1)d
2.Sum of the first n terms of an A.P. Sn = n/2[2a+(n-1)d] or Sn = n/2(first term + last term)
Geometrical Progression (G.P.):
A G.P. is of the form a, ar, ar2, ar3, ...
where a is called the 'first term' and r is called the 'common ratio'.
1.nth term of a G.P. tn = arn-1
2.Sum of the first n terms in a G.P. Sn = a|1-rn|/|1-r|
Permutations and Combinations :
1.nPr = n!/(n-r)!
2.nPn = n!
3.nP1 = n
1.nCr = n!/(r! (n-r)!)
2.nC1 = n
3.nC0 = 1 = nCn
4.nCr = nCn-r
5.nCr = nPr/r!
Number of diagonals in a geometric figure of n sides = nC2-n
Tests of Divisibility :
1.A number is divisible by 2 if it is an even number.
2.A number is divisible by 3 if the sum of the digits is divisible by 3.
3.A number is divisible by 4 if the number formed by the last two digits is divisible by 4.
4.A number is divisible by 5 if the units digit is either 5 or 0.
5.A number is divisible by 6 if the number is divisible by both 2 and 3.
6.A number is divisible by 8 if the number formed by the last three digits is divisible by 8.
7.A number is divisible by 9 if the sum of the digits is divisible by 9.
8.A number is divisible by 10 if the units digit is 0.
9.A number is divisible by 11 if the difference of the sum of its digits at odd places and the sum of its digits at even places, is divisible by 11.
H.C.F and L.C.M :
H.C.F stands for Highest Common Factor. The other names for H.C.F are Greatest Common Divisor (G.C.D) and Greatest Common Measure (G.C.M).
The H.C.F. of two or more numbers is the greatest number that divides each one of them exactly.
The least number which is exactly divisible by each one of the given numbers is called their L.C.M.
Two numbers are said to be co-prime if their H.C.F. is 1.
H.C.F. of fractions = H.C.F. of numerators/L.C.M of denominators
L.C.M. of fractions = G.C.D. of numerators/H.C.F of denominators
Product of two numbers = Product of their H.C.F. and L.C.M.
PERCENTAGES :
1.If A is R% more than B, then B is less than A by R / (100+R) * 100
2.If A is R% less than B, then B is more than A by R / (100-R) * 100
3.If the price of a commodity increases by R%, then reduction in consumption, not to increase the expenditure is : R/(100+R)*100
4.If the price of a commodity decreases by R%, then the increase in consumption, not to decrease the expenditure is : R/(100-R)*100
PROFIT & LOSS :
1.Gain = Selling Price(S.P.) - Cost Price(C.P)
2.Loss = C.P. - S.P.
3.Gain % = Gain * 100 / C.P.
4.Loss % = Loss * 100 / C.P.
5.S.P. = (100+Gain%)/100*C.P.
6.S.P. = (100-Loss%)/100*C.P.
RATIO & PROPORTIONS:
1.The ratio a : b represents a fraction a/b. a is called antecedent and b is called consequent.
2.The equality of two different ratios is called proportion.
3.If a : b = c : d then a, b, c, d are in proportion. This is represented by a : b :: c : d.
4.In a : b = c : d, then we have a* d = b * c.
5.If a/b = c/d then ( a + b ) / ( a – b ) = ( d + c ) / ( d – c ).
TIME & WORK :
1.If A can do a piece of work in n days, then A's 1 day's work = 1/n
2.If A and B work together for n days, then (A+B)'s 1 days's work = 1/n
3.If A is twice as good workman as B, then ratio of work done by A and B = 2:1
PIPES & CISTERNS :
1.If a pipe can fill a tank in x hours, then part of tank filled in one hour = 1/x
2.If a pipe can empty a full tank in y hours, then part emptied in one hour = 1/y
3.If a pipe can fill a tank in x hours, and another pipe can empty the full tank in y hours, then on opening both the pipes,
the net part filled in 1 hour = (1/x-1/y) if y>x
the net part emptied in 1 hour = (1/y-1/x) if x>y
TIME & DISTANCE :
1.Distance = Speed * Time
2.1 km/hr = 5/18 m/sec
3.1 m/sec = 18/5 km/hr
4.Suppose a man covers a certain distance at x kmph and an equal distance at y kmph. Then, the average speed during the whole journey is 2xy/(x+y) kmph.
PROBLEMS ON TRAINS :
1.Time taken by a train x metres long in passing a signal post or a pole or a standing man is equal to the time taken by the train to cover x metres.
2.Time taken by a train x metres long in passing a stationary object of length y metres is equal to the time taken by the train to cover x+y metres.
3.Suppose two trains are moving in the same direction at u kmph and v kmph such that u>v, then their relative speed = u-v kmph.
4.If two trains of length x km and y km are moving in the same direction at u kmph and v kmph, where u>v, then time taken by the faster train to cross the slower train = (x+y)/(u-v) hours.
5.Suppose two trains are moving in opposite directions at u kmph and v kmph. Then, their relative speed = (u+v) kmph.
6.If two trains of length x km and y km are moving in the opposite directions at u kmph and v kmph, then time taken by the trains to cross each other = (x+y)/(u+v)hours.
7.If two trains start at the same time from two points A and B towards each other and after crossing they take a and b hours in reaching B and A respectively, then A's speed : B's speed = (vb : v
SIMPLE & COMPOUND INTERESTS :
Let P be the principal, R be the interest rate percent per annum, and N be the time period.
1.Simple Interest = (P*N*R)/100
2.Compound Interest = P(1 + R/100)N – P
3.Amount = Principal + Interest
LOGARITHMS :
If am = x , then m = logax.
Properties :
1.log xx = 1
2.log x1 = 0
3.log a(xy) = log ax + log ay
4.log a(x/y) = log ax - log ay
5.log ax = 1/log xa
6.log a(xp) = p(log ax)
7.log ax = log bx/log ba
Note : Logarithms for base 1 does not exist.
AREA & PERIMETER :
Shape Area Perimeter
Circle ? (Radius)2 2?(Radius)
Square (side)2 4(side)
Rectangle length*breadth 2(length+breadth)
1.Area of a triangle = 1/2*Base*Height or
2.Area of a triangle = v (s(s-(s-b)(s-c)) where a,b,c are the lengths of the sides and s = (a+b+c)/2
3.Area of a parallelogram = Base * Height
4.Area of a rhombus = 1/2(Product of diagonals)
5.Area of a trapezium = 1/2(Sum of parallel sides)(distance between the parallel sides)
6.Area of a quadrilateral = 1/2(diagonal)(Sum of sides)
7.Area of a regular hexagon = 6(v3/4)(side)2
8.Area of a ring = ?(R2-r2) where R and r are the outer and inner radii of the ring.
VOLUME & SURFACE AREA :
Cube :
Let a be the length of each edge. Then,
1.Volume of the cube = a3 cubic units
2.Surface Area = 6a2 square units
3.Diagonal = v 3 a units
Cuboid :
Let l be the length, b be the breadth and h be the height of a cuboid. Then
1.Volume = lbh cu units
2.Surface Area = 2(lb+bh+lh) sq units
3.Diagonal = v (l2+b2+h2)
Cylinder :
Let radius of the base be r and height of the cylinder be h. Then,
1.Volume = ?r2h cu units
2.Curved Surface Area = 2?rh sq units
3.Total Surface Area = 2?rh + 2?r2 sq units
Cone :
Let r be the radius of base, h be the height, and l be the slant height of the cone. Then,
1.l2 = h2 + r2
2.Volume = 1/3(?r2h) cu units
3.Curved Surface Area = ?rl sq units
4.Total Surface Area = ?rl + ?r2 sq units
Sphere :
Let r be the radius of the sphere. Then,
1.Volume = (4/3)?r3 cu units
2.Surface Area = 4?r2 sq units
Hemi-sphere :
Let r be the radius of the hemi-sphere. Then,
1.Volume = (2/3)?r3 cu units
2.Curved Surface Area = 2?r2 sq units
3.Total Surface Area = 3?r2 sq units
Prism :
Volume = (Area of base)(Height)
Thursday, 17 January 2013
Practice book for Aptitude
I've uploaded a practice book for aptitude. It includes areas of interest as follows.
As the faculty teaches each field in class placement hours, you can take some problems from this book and work them out for improving your speed in solving aptitude problems.Best Wishes..! Happy learning...!
Here's the link
Click here---> Aptitude Practice Manual
Downloading from mepcoece.blogspot.com
Some students have found difficulties in downloading the files from Google docs. Once you click the 'link', you have access to the book. To download the book, click on the download button below file tab(marked by a down arrow) as in the picture given below. You can download the book to use anywhere you like.
Sunday, 6 January 2013
Sample File hosting(BEC Vocabulary)
File hosting (i.e download links) will be provided for the material that are specified. You are requested to click on the link to download the material. For example we've a Business Vocabulary manual for BEC. The Download link is given as follows
Click here----> Business Vocabulary Manual
Click on the link. Follow steps. File hosting is done through zippyshare.com and googledocs.com. For any sort of further queries contact mepcoece@gmail.com.
Click here----> Business Vocabulary Manual
Click on the link. Follow steps. File hosting is done through zippyshare.com and googledocs.com. For any sort of further queries contact mepcoece@gmail.com.
The Beginning...
Warm welcome to the MEPCO community... This Blog is created to get in touch with all students of the ECE department so that Placement & training material can easily be shared among students... You are requested to make efficient use of the service... Keep in touch with the blog...!
Subscribe to:
Posts (Atom)