Searching for "Contain"

Q:

When should we use container classes instead of arrays?

Answer

It is advisable to use container classes of the STL so that you don’t have to go through the pain of writing the entire code for handling collisions, making sure its working well, testing it repeatedly with an overhead of time consumption.


Suppose you have some data that has values associated with strings and its fields consist of grades> in this situation you can directly use hash table instead of having it created by yourself.

Report Error

View answer Workspace Report Error Discuss

Subject: C++

Q:

What is a container class?

Answer

A class is said to be a container class which is utilized for the purpose of holding objects in memory or persistent media. A generic class plays a role of generic holder. A container class is a good blend of predefined behavior and an interface that is well known. The purpose of container class is to hide the topology for the purpose of objects list maintenance in memory. A container class is known as heterogeneous container, when it contains a set of different objects. A container class is known as homogeneous container when it contains a set of similar objects.

Report Error

View answer Workspace Report Error Discuss

Subject: C++

Q:

find all Employee records containing the word "Joe", regardless of whether it was stored as JOE, Joe, or joe.

Answer

SELECT  * from Employees  WHERE  upper(EmpName) like upper('joe%');

Report Error

View answer Workspace Report Error Discuss

Subject: SQL

Q:

4 kg of a metal contains 1/5 copper and rest in Zinc. Another 5 kg of metal contains 1/6 copper and rest in Zinc.The ratio of Copper and Zinc  into the mixture of these two metals:

A) 49 : 221 B) 39:231
C) 94:181 D) None of these
 
Answer & Explanation Answer: A) 49 : 221

Explanation:

Copper in 4 kg = 4/5 kg          and      Zinc in 4 kg = 4 x (4/5) kg

 

Copper in 5 kg = 5/6 kg          and      Zinc in 5 kg = 5 x (5/6) kg

 

Therefore, Copper in mixture = 45+56=4930 kg

 

and  Zinc in the mixture = 165+256=22130kg

 

Therefore the required ratio = 49 : 221

Report Error

View Answer Report Error Discuss

Filed Under: Alligation or Mixture

Q:

There are two containers, the first one contains 1 litre pure water and the second one contains 1 litre pure milk.Now 5 cups of water from the first container is taken out  is mixed well in the second container. Then, 5 cups of this mixture is taken out and is mixed in the first container. Let A denote the proportion of milk in the first container and B denote the proportion of water in the second container then:

A) A B) A=B
C) A>B D) can't be determined
 
Answer & Explanation Answer: B) A=B

Explanation:

Here the ratio of mixtures( i.e milk , water) doesnot matter. But the important point is that whether the total amount ( either pure or mixture ) being transferred is equal or not.Since the total amount ( i.e 5 cups) being transferred from each one to another , hence A =B.

Report Error

View Answer Report Error Discuss

Filed Under: Ratios and Proportions

Q:

Alloy A contains 40% gold and 60% silver. Alloy B contains 35% gold and 40% silver and 25% copper. Alloys A and B  are mixed in the ratio of 1:4 .What is the ratio of gold and silver in the newly formed alloy is?

A) 20% and 30% B) 36% and 44%
C) 25% and 35% D) 49% and 36%
 
Answer & Explanation Answer: B) 36% and 44%

Explanation:

Assume the weight of alloy a is 100 kg 

Therefore, The weight of alloy B is 400kg

 

             Gold          silver         copper

 

    A       40kg          60kg          0kg

 

    B      140kg         160kg        100kg

 

  total    180kg          220kg        100kg

 

Therefore, Ratio of gold and silver in new alloy = 180500:200500= 36% :44%

Report Error

View Answer Report Error Discuss

Filed Under: Ratios and Proportions

Q:

From a container, 6 liters milk was drawn out and was replaced by water. Again 6 liters of mixture was drawn out and was replaced by the water. Thus the quantity of milk and water in the container after these two operations is 9:16. The quantity of mixture is:

A) 15 B) 16
C) 25 D) 31
 
Answer & Explanation Answer: A) 15

Explanation:

Let quantity of mixture be x liters.

 

Suppose a container contains x units of liquid from which y units are taken out and replaced by Water. After operations , the quantity of pure liquid = x1-yxn units, Where n = no of operations . 

 

So, Quantity of Milk = x1-6x2  

 

Given that, Milk : Water = 9 : 16 

 

=> Milk : (Milk + Water) = 9 : (9+16)

 

=> Milk : Mixture = 9 : 25 

 

 Therefore, x1-6x2x=925

 

=> x = 15 liters

Report Error

View Answer Report Error Discuss

Filed Under: Alligation or Mixture

Q:

The ratio of petrol and kerosene in the container is 3:2 when 10 liters of the mixture is taken out and is replaced by the kerosene, the ratio become 2:3. Then total quantity of the mixture in the container is:

A) 25 B) 30
C) 45 D) cannot be determined
 
Answer & Explanation Answer: B) 30

Explanation:

pool : kerosene 

   3  :  2(initially) 

   2  :  3(after replacement)

 

 Remaining QuantityInitial Quantity=1-Replaced QuantityTotal Quantity

 

(for petrol)   23=1-10k

 => K = 30

 Therefore the total quantity of the mixture in the container is 30 liters.

Report Error

View Answer Report Error Discuss

Filed Under: Alligation or Mixture