Searching for "u"

Q:

What is the default return value of a function?

A) int B) char
C) string D) None of the above
 
Answer & Explanation Answer: A) int

Explanation:

The default return value from a function is int. In other words, unless explicitly specified the default return value by compiler would be integer value from function.

Report Error

View Answer Report Error Discuss

Q:

From a deck of 52 cards, a 7 card hand is dealt.How many distinct hands are there if the hand must contain 2 spades and 3 diamonds ?

A) 7250100 B) 7690030
C) 7250000 D) 3454290
 
Answer & Explanation Answer: A) 7250100

Explanation:

There are 13 spades,we must include 2: 13C2

 

There are 13 diamonds,we must include 3: 13C3

 

Since we can't have more than 2 spades and 3 diamonds,the remaining 2 cards must be pulled out from the 26 remaining clubs and hearts : 26C2

 

Therefore,13C2*13C3*26C2 = 7250100

Report Error

View Answer Report Error Discuss

Q:

Which among the following keys are used to identify each row of the table uniquely?

A) Primary key B) Unique key
C) Partial key D) None of the above
 
Answer & Explanation Answer: A) Primary key

Explanation:

Primary key helps us to identify a row uniquely in a relation

Report Error

View Answer Report Error Discuss

Q:

A school committee of 5 is to be formed from 12 students.How many committees can be formed if John must be on the committee?

A) 11P4 B) 11C4
C) 11P5 D) 11C5
 
Answer & Explanation Answer: B) 11C4

Explanation:

If John must be on the committee,we have 11 students remaining,out of which we choose 4. So,11C4

Report Error

View Answer Report Error Discuss

Q:

If there are 17 randomly placed dots on a circle,how many lines can you form using any 2 dots?

A) 126 B) 130
C) 136 D) 120
 
Answer & Explanation Answer: C) 136

Explanation:

17C2 = 136 (combination)

Report Error

View Answer Report Error Discuss

Q:

How many ways can you select 17 songs for mix CD out of possible 38 songs?

A) 2878 B) 2878 x 10^2
C) 290183753 D) 2878 x 10^10
 
Answer & Explanation Answer: D) 2878 x 10^10

Explanation:

since it is a combination = 38C17 = 2878 x 10^10

Report Error

View Answer Report Error Discuss

Q:

A pizza can have 3 toppings out of possible 7 toppings.How many different pizza's can be made?

A) 49 B) 35
C) 27 D) 25
 
Answer & Explanation Answer: B) 35

Explanation:

There are 7 toppings in total,and by selecting 3,we will make different types of pizza.

 

This question is a combination since having a different order of toppings will not make a different pizza.

 

So,7C3 =35

Report Error

View Answer Report Error Discuss

Q:

A column defined as UNIQUE can contain Nulls while a column defined as PRIMARY KEY can't contain Nulls

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

Explanation:

Because a table can have only one primary key

Report Error

View Answer Workspace Report Error Discuss