Searching for "he"

Q:

In how many ways can 5 different toys be packed in 3 identical boxes such that no box is empty, if any of the boxes may hold all of the toys ?

A) 36 B) 25
C) 24 D) 72
 
Answer & Explanation Answer: B) 25

Explanation:

The toys are different; The boxes are identical 

 

If none of the boxes is to remain empty, then we can pack the toys in one of the following ways 

a. 2, 2, 1 

b. 3, 1, 1 

 

Case a. Number of ways of achieving the first option 2 - 2 - 1 

 

Two toys out of the 5 can be selected in 5C2 ways. Another 2 out of the remaining 3 can be selected in 3C2 ways and the last toy can be selected in 1C1 way. 

 

However, as the boxes are identical, the two different ways of selecting which box holds the first two toys and which one holds the second set of two toys will look the same. Hence, we need to divide the result by 2 

 

Therefore, total number of ways of achieving the 2 - 2 - 1 option is ways 5C2*3C2= 15 ways

 

 

Case b. Number of ways of achieving the second option 3 - 1 - 1

 

Three toys out of the 5 can be selected in 5C3 ways. As the boxes are identical, the remaining two toys can go into the two identical looking boxes in only one way.

 

Therefore, total number of ways of getting the 3 - 1 - 1 option is 5C3 = 10 = 10 ways.

 

 

 

Total ways in which the 5 toys can be packed in 3 identical boxes

 

= number of ways of achieving Case a + number of ways of achieving Case b= 15 + 10 = 25 ways.

Report Error

View Answer Report Error Discuss

Q:

What are the notations used in Evaluation of Arithmetic Expressions using prefix and postfix forms?

A) Polish B) Reverse Polish
C) Both A and B D) None of the above
 
Answer & Explanation Answer: C) Both A and B

Explanation:

Polish and Reverse Polish are the notations used in Evaluation of Arithmetic Expressions using prefix and postfix forms

Report Error

View Answer Report Error Discuss

Filed Under: Database
Job Role: Database Administration

Q:

How many integers, greater than 999 but not greater than 4000, can be formed with the digits 0, 1, 2, 3 and 4, if repetition of digits is allowed?

A) 376 B) 375
C) 500 D) 673
 
Answer & Explanation Answer: A) 376

Explanation:

The smallest number in the series is 1000, a 4-digit number.

 

The largest number in the series is 4000, the only 4-digit number to start with 4. 

 

The left most digit (thousands place) of each of the 4 digit numbers other than 4000 can take one of the 3 values 1 or 2 or 3.

 

The next 3 digits (hundreds, tens and units place) can take any of the 5 values 0 or 1 or 2 or 3 or 4.

 

Hence, there are 3 x 5 x 5 x 5 or 375 numbers from 1000 to 3999.

 

Including 4000, there will be 376 such numbers.

Report Error

View Answer Report Error Discuss

Q:

If you are using C language to implement the heterogeneous linked list, what pointer type will you use?

Answer

The heterogeneous linked list contains different data types in its nodes and we need a link, pointer to connect them. It is not possible to use ordinary pointers for this. So we go for void pointer. Void pointer is capable of storing pointer to any type as it is a generic pointer type.

Report Error

View answer Workspace Report Error Discuss

Subject: Database Exam Prep: GATE
Job Role: Database Administration

Q:

There are 2 brothers among a group of 20 persons. In how many ways can the group be arranged around a circle so that there is exactly one person between the two brothers?

A) 18! x 19! B) 2 x 19!
C) 2 x 18! D) 18! x 18!
 
Answer & Explanation Answer: C) 2 x 18!

Explanation:

fix one person and the brothers B1 P B2 = 2 ways to do so.
other 17 people= 17!

 
Each person out of 18 can be fixed between the two=18, thus, 2 x 17! x 18=2 x 18!

Report Error

View Answer Report Error Discuss

Q:

Parenthesis is never required in Postfix or Prefix expressions

A) TRUE B) FALSE
Answer & Explanation Answer: A) TRUE

Explanation:

Parenthesis is not required because the order of the operators in the postfix /prefix expressions determines the actual order of operations in evaluating the expression

Report Error

View Answer Workspace Report Error Discuss

Subject: Database
Job Role: Database Administration

Q:

There are fourteen juniors and twenty-three seniors in the Service Club. The club is to send four representatives to the State Conference. If the members of the club decide to send two juniors and two seniors, how many different groupings are possible ?

A) 23024 B) 24023
C) 23023 D) 25690
 
Answer & Explanation Answer: C) 23023

Explanation:

Choose 2 juniors and 2 seniors.

 

14C2*23C2 = 23023

Report Error

View Answer Report Error Discuss

Q:

The time complexity of sequential search is

A) O(n) B) O(2n)
C) O(n^2) D) None
 
Answer & Explanation Answer: A) O(n)

Explanation:

The time complexity of sequential search is O(n)

Report Error

View Answer Report Error Discuss

Filed Under: Database
Job Role: Database Administration