Friday, June 8, 2007

Campus_16

All India Level Contest

Winner of Campus_15 is

Amit Paliwal (National Informatics Centre, Pune)

1. What is the final value of y when the code int y; for(y=0; y<10; y++) {} is run?
A. 10
B. 9
C. 0
D. 1

2. When does the code block following while(y<100) execute?
A. When y is less than one hundred
B. When y is greater than one hundred
C. When y is equal to one hundred
D. While it wishes


3. Which is not a loop structure?
A. for
B. do while
C. while
D. repeat until

4. How many times is a do while loop guaranteed to loop?
A. 0
B. Infinitely
C. 1
D. Variable

Send your answer to sandeepinfo@yahoo.co.in

Join http://groups.yahoo.com/group/campus_online/ for more updated information

Earn 1860 Rs/Month by reading SMS

Thursday, May 31, 2007

Campus_15

Earn 1860 Rs/Month by reading SMS


All India Level Contest


Q: In C++, what is the difference between method overloading and method overriding?
Answer: Overloading a method (or function) in C++ is the ability for functions of the same name to be defined as long as these methods have different signatures (different set of parameters). Method overriding is the ability of the inherited class rewriting the virtual method of the base class.


Q: What is pure virtual function?
Answer: A class is made abstract by declaring one or more of its virtual functions to be pure. A pure virtual function is one with an initializer of = 0 in its declaration.


Q: What is a virtual destructor?
Answer: The simple answer is that a virtual destructor is one that is declared with the virtual attribute. The behavior of a virtual destructor is what is important. If you destroy an object through a pointer or reference to a base class, and the base-class destructor is not virtual, the derived-class destructors are not executed, and the destruction might not be complete.

Q: What is virtual channel?
Answer: Virtual channel is normally a connection from one source to one destination, although multicast connections are also permitted. The other name for virtual channel is virtual circuit.



Join http://groups.yahoo.com/group/campus_online/ for more updated information



Earn 1860 Rs/Month by reading SMS

Friday, May 25, 2007

Campus_14

Earn 1860 Rs/Month by reading SMS

=========================================================

1. A trader has 100 Kg of wheat, part of which he sells at 5% profit and the rest at 20% profit. He gains 15% on the whole. Find how much is sold at 5% profit?

(A) 60 (B)50 (C)66.66 (D) 33.3

Solution: The correct answer is D i.e. 33.3
if x = amt sold at 5% profit,
y = amt sold at 20% profit
x+y=1005
x + 20y = 1500
solving the above equations we get
x=33.3


2. In 1978, a kg of paper was sold at Rs25/-. If the paper rate increases at 1.5% more than the inflation rate which is 6.5% a year, then what wil be the cost of a kg of paper after 2 years?

Solution: Depends wether it means 1.5% as a percentage of the paper rate or as a percentage of the 6.5% inflation on the paper rate. In the case of the latter, you should :

25 * 0.065 * 1.015 + 25 = x ( cost after one year ).
x * 0.065 * 1.015 + x = 29.4

In the case of the former the total increase rate is 1.5% + 6.5% = 8%
so
25 * 1.08 * 1.08 = 29.16



3. A driver drives at a speed of 72kmph in a highway. Another driver drives at the speed of 25 m/sec . find the difference in their speeds in m/sec. ?


Solution: Speed of 1st car=>72kmph=72*5/18m/sec=20m/sec.
speed of second car=>25m/sec.

Therefore difference in their speed =5m/sec


4. In a mixture R is 2 parts and S is 1 part. In order to make S to 25% of the mixture how r is needed ?

Solution: consider the fraction of s in the mixture = 1/3So if we add one more R the the fraction wil be = 1/4
Automaticaly S becomes 25% of the mixture.
================================================================


Join http://groups.yahoo.com/group/campus_online/ for more updated information

Earn 1860 Rs/Month by reading SMS